CSWSite/serverc.aspx.cs

(完整代码) 1KB

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using CSWBLL;
using DBUtility;
using CSWModel;
namespace CSWSite
{
    public partial class serverc : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                ReadNewsInfo();

            }
        }
        private void ReadNewsInfo()
        {
            string NewsId = GetMes.GetRequestQuery(Request, "newsid");
            if (!String.IsNullOrEmpty(NewsId))
            {
                List<Modelcontents> lt = BLLcontents.ReadContentsById(NewsId);
                ltNewsContents.Text = lt[0].csw_contents;
                lbNewsTitle.Text = lt[0].csw_title;
                lbTitle.Text = lt[0].csw_title;
                lbtimes.Text = Convert.ToDateTime(lt[0].csw_times).ToString("d");
                lbclick.Text = lt[0].csw_click.ToString();
                lbAuthor.Text = lt[0].csw_author;
                lbChannelName.Text = BLLcontents.SelectClassNameByTypeId(lt[0].csw_typeId.ToString());
                BLLcontents.UpdateClick(NewsId);//更新点击次数

                string webTitle = lt[0].csw_title;
                string webdescription = BLLcommon.SelectFieldInfoByFieldName("csw_description", "csw_webinfo", "id", "1");
                string webkeywords = BLLcommon.SelectFieldInfoByFieldName("csw_keywords", "csw_webinfo", "id", "1");
                BLLcommon.WebHead(this, webTitle, webdescription, webkeywords);

            }
            else
            {
                MessageBox.ShowAndRedirect(this, "无效链接..", "index.aspx");
            }
        }
    }
}

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

AI 解读

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

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