info.aspx.cs

(完整代码) 1KB

using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using BLL.Article;
using CSA.DAL;


public partial class info : System.Web.UI.Page
{
    protected string cur_Code, title, content, cur_id;
    protected DataRow drList;
    protected DataTable dtList, dtKind, dtList2;
    protected void Page_Load(object sender, EventArgs e)
    {
        BindAboutUs();
    }

    protected void BindAboutUs()
    {
        cur_Code = Request.QueryString["code"];   //接收Code
        if (string.IsNullOrEmpty(cur_Code))                //如果没有Code传进,自定义Code
        {
            cur_Code = "010401";
        }

        dtList = BLL.Article.Article.getList(cur_Code, 1);
        drList = dtList.Rows[0];
        title = drList["title"].ToString();
        content = drList["content"].ToString();
        if (cur_Code.Length == 6 && cur_Code.Remove(4, 2) == "0104")
        {
            if (Convert.ToInt16(cur_Code.Remove(0, 4)) < 06)
            {
                string sql = "select  top 5 * from bs_News where bs_newsKindCode like '0104__' order by bs_newsKindCode asc";
                dtList2 = DBAccess.getRS(sql);
            }
            else
            {
                string sql = "select * from bs_News where id not in ";
                sql += " ( select  id  from bs_news where bs_newskindcode like '0104__' order by bs_newskindcode asc limit 5)";
                sql += " and bs_newskindcode like '0104__' order by bs_newsKindcode asc limit 3";
               
                dtList2 = DBAccess.getRS(sql);
            }
        }

    }
}

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

AI 解读 AI

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

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