System/zd.aspx.cs

(开头部分) 2KB

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

using System;
using System.Data;
using System.Data.SqlClient;
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;

public partial class System_Sys_News_Cls : System.Web.UI.Page
{
    #region 初始化页面
    protected string con = CommonLib.SqlHelper.SqlConnectionString;
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            //CommonLib.AccessHelper.islogin(this.Page);
            ViewState.Add("where", "");
          
            Bind();
        }
    }
    #endregion

 

    #region 绑定类别列表
    private void Bind()
    {
        string count = "select count(*) from pro where username='" + Session["username"].ToString() + "'";
        AspNetPager1.RecordCount = Convert.ToInt32(CommonLib.SqlHelper.ExecuteScalar(con, CommandType.Text, count, null));
        string sql = "select * from pro where username='" + Session["username"].ToString() + "'";
        CommonLib.SqlHelper.BindGridView(GridView1, sql, AspNetPager1.PageSize, AspNetPager1.CurrentPageIndex - 1);
    }
    #endregion


    #region 分页
    protected void AspNetPager1_PageChanged(object sender, EventArgs e)
    {
        GridView1.EditIndex = -1;
        Bind();
    }
    #endregion


    #region 生成js
    private void updatejs()
    {
        string sql = "select * from pro_cls";
        string url = System.Web.HttpContext.Current.Server.MapPath("~/js/cls.js");
        System.IO.StreamWriter file = new System.IO.StreamWriter(url, false, System.Text.Encoding.UTF8);
        file.WriteLine("provincearray = new Array();");
        int i = 0;
        try
        {
后面还有 13 行代码,购买后查看完整代码

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

AI 解读

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

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