Web/Manage_Vaisi/NewsType.aspx.cs

(开头部分) 6KB

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

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Ext.Net;
using System.Data;


public partial class Manage_Vaisi_NewsType : System.Web.UI.Page
{
    public static string iid = null;
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["Vaisi_User"] == null)
        {
            X.Redirect("Login.aspx", "登录超时,请重新登录...");
        }
        if (!X.IsAjaxRequest)
        {
            Bind();
        }
    }
    protected void Store_Re(object sender, StoreRefreshDataEventArgs e)
    {
        Bind();
    }
    /// <summary>
    /// 获取新闻分类
    /// </summary>
    public void Bind()
    {
        try
        {
            string sql = "select * from vaisi_newstype order by sorts";
            IList<Vaisi_newstypeModel> list = new List<Vaisi_newstypeModel>();
            DataTable table = SqlHelper.GetScalarListTable(sql);
            foreach (DataRow row in table.Rows)
            {
                Vaisi_newstypeModel newstype = new Vaisi_newstypeModel();
                newstype.Id = Convert.ToInt32(row["id"]);
                newstype.Classnames = Convert.ToString(row["classnames"]);
                newstype.Example = Convert.ToString(row["example"]);
                newstype.Sorts = Convert.ToInt32(row["sorts"]);
                list.Add(newstype);
            }
            this.Store1.DataSource = list;
            this.Store1.DataBind();            
        }
        catch (Exception)
        {
            X.Msg.Show(new MessageBoxConfig
            {
                Title = "系统数据错误",
                Message = "请稍候再试,或联系开发技术人员处理",
                Buttons = MessageBox.Button.OK,
                Icon = MessageBox.Icon.WARNING,
            });
        }
后面还有 119 行代码,解锁后查看完整代码

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

AI 解读 AI

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

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