Web/News.aspx.cs

(开头部分) 3KB

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

using System;
using System.Data;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;

namespace Maticsoft.Web
{
    public partial class News : System.Web.UI.Page
    {
        string StrWhere = ""; int TypeID = 0;
        protected void Page_Load(object sender, EventArgs e)
        {
            InitNewTypeLoad();
            HtmlHead();
            if (Request.Params["TypeID"] != null && Request.Params["TypeID"] != "")
            {
                Maticsoft.BLL.NewsTypeInfo tBll = new Maticsoft.BLL.NewsTypeInfo();
                TypeID = int.Parse(Request.Params["TypeID"]);
                if (tBll.Exists(TypeID) == false)
                {
                    lblTypeName.Text = "新闻列表";
                    lblInfo.Text = "信息正在发布中,请耐心等待....";
                }
                else
                {
                    try
                    {
                        Maticsoft.Model.NewsTypeInfo tModel = tBll.GetModel(TypeID);
                        lblTypeName.Text = tModel.E_NewsTypeName;
                        StrWhere = " E_NewsTypeID=" + TypeID + " and ";
                        NewsLoad(StrWhere);
                    }
                    catch
                    {
                        lblTypeName.Text = "新闻列表";
                        lblInfo.Text = "信息正在发布中,请耐心等待....";
                    }
                }
            }
            else
            {
                StrWhere = " ";
                lblTypeName.Text = "新闻列表";
                NewsLoad(StrWhere);
            }

        }

        private void InitNewTypeLoad()
        {
            Maticsoft.BLL.NewsTypeInfo tBll = new Maticsoft.BLL.NewsTypeInfo();
            DataNewType.DataSource = tBll.GetAllList();
            DataNewType.DataBind();
        }

        private void NewsLoad(string Where)
        {
            Maticsoft.BLL.NewsInfo probll = new Maticsoft.BLL.NewsInfo();
            DataSet ds = probll.GetList(" " + Where + " E_Islock='1' ");
            DataView dv = ds.Tables[0].DefaultView;
后面还有 39 行代码,购买后查看完整代码

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

AI 解读

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

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