private void ShowInfo(int WebStatusID) { WebSiteData.WebStatus bll = new WebSiteData.WebStatus(); WebSiteModel.WebStatus model = bll.GetModel(WebStatusID); this.lblWebStatusID.Text = model.WebStatusID.ToString(); this.txtStatus.Text = model.Status; this.txtRemark.Value = model.Remark; this.txtColor.Text = model.Color; }
private bool DoEdit(int id) { bool result = true; WebSiteData.WebStatus bll = new WebSiteData.WebStatus(); WebSiteModel.WebStatus model = bll.GetModel(id); int WebStatusID = id; string Status = this.txtStatus.Text; string Remark = this.txtRemark.Value; string Color = this.txtColor.Text; model.WebStatusID = WebStatusID; model.Status = Status; model.Remark = Remark; model.Color = Color; if (!bll.Update(model)) { result = false; } return(result); }