index.aspx.cs

(开头部分) 3KB

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

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

public partial class index : System.Web.UI.Page
{
    public string notice = "";
    public string Introduction = "";
    protected void Page_Load(object sender, EventArgs e)
    {
        if (IsPostBack)
            return;
        note();
        Intro();
        GetNewsList();
        GetKnowledge();
        Information();
    }
    #region 数据绑定
    #region 公告
    private void note()
    {
        string sqlNot = "select notice from KY_announcement where isUse=1 order by date desc";
        DataTable dt = KYSql.ExecuteQuery(sqlNot);
        if (dt.Rows.Count > 0)
        {
            notice = dt.Rows[0]["notice"].ToString();
        }
        else
        {
            notice = "目前没有公告信息...";
        }
    } 
    #endregion

    #region 关于我们
    private void Intro()
    {
        string sqlNot = "select * from KY_Article where typeID=21 and isUse=1 order by datetime desc";
        DataTable dtt = KYSql.ExecuteQuery(sqlNot);
        Introduction = Server.HtmlDecode(dtt.Rows[0]["contents"].ToString());

    } 
    #endregion

    #region 新闻动态
    private void GetNewsList()
    {
        string SQL = "select top 7 * from KY_Article Where typeID = 11 and isUse=1 ORDER BY id DESC ";
        dlInform.DataSource = KYSql.ExecuteQuery(SQL);
        dlInform.DataBind();
    } 
    #endregion

    #region 行业知识
    private void GetKnowledge()
后面还有 44 行代码,购买后查看完整代码

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

AI 解读

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

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