using System; using System.Collections.Generic; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; namespace Mtxfw.shop { public partial class weixin : System.Web.UI.Page { public String MenuName = String.Empty, ParentID = String.Empty; public Mtxfw.DAL.Article daoArt = new Mtxfw.DAL.Article(); public Mtxfw.Utility.Config config = new Mtxfw.Utility.Config(); public String value = String.Empty; protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { String GetID = Request.QueryString["ID"]; if (!String.IsNullOrEmpty(GetID) && Mtxfw.Utility.Tools.HasInt(GetID)) { Int32 ID = int.Parse(Request.QueryString["ID"]); Mtxfw.Model.Article model = daoArt.GetModel(ID); if (model != null) { Page.Title = model.Title + " - " + config.webName; MenuName = model.Title; Lit_Time.Text = model.AddTime.ToString(); Lit_Content.Text = model.Content; Lit_Content2.Text = model.Content2; int ParentID = model.ParentID; if (ParentID == 8) { if (Session["MemberId"] != null) { if (model.receiverid == int.Parse(Session["MemberId"].ToString())) { daoArt.UpdateuSel("Seef", 1, ID); } } else { string RUrl = Request.Url.ToString(); Response.Cookies.Add(new HttpCookie("{RUrl}", RUrl)); Response.Cookies["{RUrl}"].Expires = DateTime.Now.AddDays(1); Mtxfw.Utility.Tools.Message("您未登录!", "/"); } } Page.Title = MenuName + " - " + config.webName; Page.MetaDescription = MenuName + " - " + config.webName; Page.MetaKeywords = MenuName + "," + config.webName; Mtxfw.Model.Article MinModel = daoArt.GetMinModel(ID, ParentID); Mtxfw.Model.Article MaxModel = daoArt.GetMaxModel(ID, ParentID); if (MinModel != null) { Hy_Min.NavigateUrl = "/weixin.aspx?ID=" + MinModel.id.ToString(); Hy_Min.Text = MinModel.Title; } else { Hy_Min.Enabled = false; Hy_Min.Text = "没有了"; } if (MaxModel != null) { Hy_Max.NavigateUrl = "/weixin.aspx?ID=" + MaxModel.id.ToString(); Hy_Max.Text = MaxModel.Title; } else { Hy_Max.Enabled = false; Hy_Max.Text = "没有了"; } } } else { Response.StatusCode = 404; Response.End(); } } } } }