Backup/程序/System/Sys_Product_Cls.aspx.cs

(开头部分) 10KB

这里只显示每个文件的开头 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_Drop(ddl_type);
            Bind();
        }
    }
    #endregion

    #region 绑定类别
    private void Bind_Drop(DropDownList ddl)
    {
        string sql = "select * from pro_cls where pro_cls_pid=0";
        CommonLib.SqlHelper.BindDropDownList(ddl, "pro_cls_name", "pro_cls_id", con, CommandType.Text, sql, null);
    }
    #endregion

    #region 绑定类别列表
    private void Bind()
    {
        string count = "select count(*) from pro_cls where pro_cls_pid>0 and pro_cls_pid<>3";
        AspNetPager1.RecordCount = Convert.ToInt32(CommonLib.SqlHelper.ExecuteScalar(con, CommandType.Text, count, null));
        string sql = "select * from pro_cls where pro_cls_pid>0 and pro_cls_pid<>3 order by pro_cls_pid asc,pro_cls_id desc";
        CommonLib.SqlHelper.BindGridView(GridView1, sql, AspNetPager1.PageSize, AspNetPager1.CurrentPageIndex - 1);

        if (AspNetPager1.RecordCount > 0)
        {
            quanxuan.Visible = true;
            Button2.Visible = true;
        }
        else
        {
            quanxuan.Visible = false;
            Button2.Visible = false;
        }
    }
    #endregion

    #region 添加
    protected void Button3_Click(object sender, EventArgs e)
    {
后面还有 242 行代码,购买后查看完整代码

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

AI 解读 AI

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

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