HLW/List.aspx.cs

(开头部分) 7KB

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

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Text;

namespace HLW
{
    public partial class List : System.Web.UI.Page
    {
        BLL.Channel bll = new BLL.Channel();
        public Model.Channel mo = new Model.Channel();
        public StringBuilder json = new StringBuilder();
        public string jslist ="";
        public string pagelist = "";
        public string ads_1 = "", ads_2 = "", ads_3 = "";
        protected void Page_Load(object sender, EventArgs e)
        {
            int cid = 0;
            int pager = 1;
            if (Request.QueryString["cid"] != null)
            {
                cid = int.Parse(Request.QueryString["cid"]);
                pager = int.Parse(Request.QueryString["page"]);
                mo = bll.GetModel(cid);
                json = (new NC.NCPub()).getNSList((int)mo.c_pid, (int)mo.c_id);
                jslist = getListByPage(cid, pager, ref pagelist);
                BLL.ads bads = new BLL.ads();
                List<Model.ads> mads = new List<Model.ads>();
                string sw = " c_id=" + mo.c_id;
                if (bads.GetRecordCount(sw) > 0)
                {
                    mads = bads.GetModelList(sw);
                    foreach (Model.ads ma in mads)
                    {
                        if (ma.p_point == "上")
                            ads_1 = ma.p_contents;
                        if (ma.p_point == "中")
                            ads_2 = ma.p_contents;
                        if (ma.p_point == "下")
                            ads_3 = ma.p_contents;
                    }
                }
            }
            else
            {
                Response.Redirect("/index.htm");
            }
        }
 

        public string getListByPage(int cid, int pager, ref string pagelist)
        {
            StringBuilder js = new StringBuilder();
            BLL.News bll = new BLL.News();
            List<Model.News> list = bll.DataTableToList(bll.GetListByPage(" c_id=" + cid, " n_addTime desc ", ((pager - 1) * 6 + 1), pager * 6).Tables[0]);
            int pageCount = (int)Math.Ceiling(bll.GetRecordCount(" c_id=" + cid) / (6 * 1.0));
            if (pageCount == 0)
后面还有 125 行代码,购买后查看完整代码

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

AI 解读

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

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