WebSiteShop/Article/ShowArticle.aspx.cs
(开头部分) 3KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using MyShop.Model;
using MyShop.Common;
using MyShop.Enumerations;
using System.Collections.Generic;
using MyShop.BLL;
using System.Text;
public partial class Article_ShowArticle : BasePage
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
ShowDetailDataBind(WebUtils.GetQueryInt("articleId", -1));
Article article = new Article(WebUtils.GetQueryInt("articleId", -1));
if (article.IsExist)
article.AddHit(1);
}
this.Title = BasePage.configInfo.SiteName + "--" + ArticleTitle;
}
protected void ShowDetailDataBind(int articleId)
{
Article article = new Article();
MyShop.Model.ArticleInfo model = new MyShop.Model.ArticleInfo();
model = article.GetModel(articleId);
if (model != null)
{
MyShop.BLL.Tag tag = new Tag();
lblAuthor8.Text = model.Author;
lblContent8.Text = tag.Replace(model.Content);
lblCopyFrom8.Text = model.CopyFrom;
lblCreateTime8.Text = Convert.ToDateTime(model.CreateTime).ToString("yyyy-MM-dd");
lblEditor8.Text = model.Editor;
lblHit8.Text = model.Hits.ToString();
lblInputer8.Text = model.Inputer;
lblTitle8.Text = model.Title;
switch (model.Stars)
{
case 1:
lblStars8.Text = "★";
break;
case 2:
lblStars8.Text = "★★";
break;
后面还有 75 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。
