MyShouCang.aspx.cs

(开头部分) 2KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
using System.IO;
public partial class MyShouCang : System.Web.UI.Page
{
    DB data = new DB();
    js js = new js();
    protected void Page_Load(object sender, EventArgs e)
    {
        this.Title = "校园网络招聘平台系统";
        if (Session["username"] == null)
        {
            js.AlertAndRedirect("对不起您还没有登录", "UserLogin.aspx");
        }
        else
        {
            gvInfo.DataSource = GetCodeBy(0);
            gvInfo.DataBind();
        }

    }
    protected void LinkButton1_Click(object sender, EventArgs e)
    {
        Response.Redirect("ModifyMyInfo.aspx");
    }
    public DataSet GetCodeBy(int iCount)
    {
        DB date = new DB();
        string strTop = "";
        if (iCount > 1)
        {
            strTop = "top " + iCount.ToString();
        }

        string sql = "select  " + strTop + "  * from [FavoritesJob] where Username='" + Session["username"].ToString() + "'";
        SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString);
        SqlCommand cmd = new SqlCommand(sql, con);

        SqlDataAdapter da = new SqlDataAdapter(cmd);
        DataSet ds = null;
        try
        {
            con.Open();
            ds = new DataSet();
            da.Fill(ds);

        }
        catch (SqlException ex)
        {
            throw ex;
        }
后面还有 18 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读 AI

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。