private void ShowInfo(int Id) { Maticsoft.BLL.News bll = new Maticsoft.BLL.News(); Maticsoft.Model.News model = bll.GetModel(Id); this.lblName.Text = model.Name; BLL.NewsType BLLNewsType = new BLL.NewsType(); Model.NewsType ModelNewsType = BLLNewsType.GetModel((int)model.Fk_NewsType_Id); this.lblContents.Text = model.Contents; BLL.Users BLLUsers = new BLL.Users(); Model.Users ModelUsers = BLLUsers.GetModel((int)model.Fk_Users_Id); this.lblFk_Users_Id.Text = ModelUsers.Name; this.lblAddTime.Text = model.AddTime.ToString(); if (Session["LoginUser"] == null) { lblUser.Text = "匿名"; } else { BLL.Users bllleaveuser = new BLL.Users(); Model.Users modelleaveuser = bllleaveuser.GetModel((int)Session["LoginUser"]); lblUser.Text = modelleaveuser.TrueName; } }
private void ShowInfo(int Id) { Maticsoft.BLL.News bll = new Maticsoft.BLL.News(); Maticsoft.Model.News model = bll.GetModel(Id); this.lblId.Text = model.Id.ToString(); this.lblName.Text = model.Name; BLL.NewsType BLLNewsType = new BLL.NewsType(); Model.NewsType ModelNewsType = BLLNewsType.GetModel((int)model.Fk_NewsType_Id); this.lblFk_NewsType_Id.Text = ModelNewsType.Name; this.lblContents.Text = model.Contents; BLL.Users BLLUsers = new BLL.Users(); Model.Users ModelUsers = BLLUsers.GetModel((int)model.Fk_Users_Id); this.lblFk_Users_Id.Text = ModelUsers.Name; this.lblAddTime.Text = model.AddTime.ToString(); }