WebApplication/Admin/SysLabel/AddSQLLabel.aspx.cs

(开头部分) 11KB

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

using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Xml;

namespace WebApplication.Admin.SysLabel
{
    public partial class AddSQLLabel : System.Web.UI.Page
    {
        BLL.Cache.GZXX_Label bll = new BLL.Cache.GZXX_Label();
        BLL.Models.GZXX_Class cbll = new BLL.Models.GZXX_Class();
        Model.Models.GZXX_Model m = new Model.Models.GZXX_Model();
        BLL.Models.GZXX_Model bm = new BLL.Models.GZXX_Model();
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!this.IsPostBack)
            {
                PageSize.Attributes.Add("type", "number");
                DataTable dt = cbll.GetDataTable("(convert(varchar,classid) + '|' + convert(varchar,channelid)) as classid,classname", " where ParentClassID = 0 ", null);
                DataTable ndt = new DataTable();
                ndt.Columns.Add("classid");
                ndt.Columns.Add("classname");
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    DataRow dr = ndt.NewRow();
                    dr[0] = dt.Rows[i]["classid"].ToString();
                    dr[1] = dt.Rows[i]["classname"].ToString();
                    ndt.Rows.Add(dr);
                    DataTable cdt = cbll.GetDataTable("(convert(varchar,classid) + '|' + convert(varchar,channelid)) as classid,classname", " where ParentClassID = " + int.Parse(dt.Rows[i]["classid"].ToString().Split('|')[0]) + " ", null);
                    for (int j = 0; j < cdt.Rows.Count; j++)
                    {
                        dr = ndt.NewRow();
                        dr[0] = cdt.Rows[j]["classid"].ToString();
                        dr[1] = "  └ " + cdt.Rows[j]["classname"].ToString();
                        ndt.Rows.Add(dr);
                    }
                }
                DropDownList1.DataSource = ndt;
                DropDownList1.DataTextField = "classname";
                DropDownList1.DataValueField = "classid";
                DropDownList1.DataBind();
                
                if (Request.QueryString["LabelID"] != null)
                {
                    Model.Cache.GZXX_Label model = new Model.Cache.GZXX_Label();
                    model = bll.GetLabelInfo(int.Parse(Request.QueryString["LabelID"]));
                    TextBox1.Text = model.LabelName;
                    ctl00_KSContent_LabelContent.Value = model.LabelContent;
                    PageSize.Text = model.PageSize.ToString();
                    TextBox2.Text = model.ClassName;
                    SQLTypeText.Text = model.SqlType;
                    for (int i = 0; i < DropDownList2.Items.Count; i++)
                    {
                        if (DropDownList2.Items[i].Value == model.SqlOrderBy) 
                        {
                            DropDownList2.Items[i].Selected = true;
后面还有 167 行代码,购买后查看完整代码

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

AI 解读

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

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