private void LoadData() { InitCaptchaCode(); Maticsoft.BLL.tSet bll = new Maticsoft.BLL.tSet(); Maticsoft.Model.tSet model = bll.GetModel(1); Window1.Title = model == null ? "" : model.WebName; }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { Maticsoft.BLL.tSet bll = new Maticsoft.BLL.tSet(); model = bll.GetModel(1); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { LoadData(); Maticsoft.Model.tUsers user = GetIdentityUser(); btnUserName.Text = user.usersName; btnUserName.ToolTip = dptbll.GetModel(user.dptId).dptName; Maticsoft.BLL.tSet bll = new Maticsoft.BLL.tSet(); model = bll.GetModel(1); GetTask(user.dptId); } }
protected void btnSave_Click(object sender, EventArgs e) { Maticsoft.BLL.tSet bll = new Maticsoft.BLL.tSet(); Maticsoft.Model.tSet model = bll.GetModel(1); if (model == null) { Maticsoft.Model.tSet newm = new Maticsoft.Model.tSet(); newm.Address = Address.Text; newm.BeiAn = BeiAn.Text; newm.Copyright = Copyright.Text; newm.Description = Description.Text; newm.Email = Email.Text; newm.KeyWords = KeyWords.Text; newm.Tel = Tel.Text; newm.WebName = WebName.Text; model.PostCpde = YouBian.Text; model.WeChart = WeiXin.Text; if (bll.Add(newm) > 0) { Alert.ShowInTop("保存成功!"); } else { Alert.ShowInTop("保存失败!"); } } else { model.Address = Address.Text; model.BeiAn = BeiAn.Text; model.Copyright = Copyright.Text; model.Description = Description.Text; model.Email = Email.Text; model.KeyWords = KeyWords.Text; model.Tel = Tel.Text; model.WebName = WebName.Text; model.PostCpde = YouBian.Text; model.WeChart = WeiXin.Text; if (bll.Update(model)) { Alert.ShowInTop("保存成功!"); } else { Alert.ShowInTop("保存失败!"); } } }
public void SetWebHeader(Page page) { Maticsoft.BLL.tSet bll = new Maticsoft.BLL.tSet(); Maticsoft.Model.tSet model = bll.GetModel(1); HtmlMeta keywords = new HtmlMeta(); keywords.Name = "keywords"; keywords.Content = model.KeyWords; page.Header.Controls.Add(keywords); HtmlMeta description = new HtmlMeta(); description.Name = "description"; description.Content = model.Description; page.Header.Controls.Add(description); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { LoadData(); Maticsoft.Model.tUsers user = GetIdentityUser(); btnUserName.Text = user.usersName; Maticsoft.BLL.tSet bll = new Maticsoft.BLL.tSet(); model = bll.GetModel(1); Maticsoft.BLL.S_Onlines bllOn = new Maticsoft.BLL.S_Onlines(); Maticsoft.Model.S_Onlines online = bllOn.GetModelByUseId(user.userId); CreateNotify("您上次登陆时间是:" + online.UpdateTime, "Self", "登录提示", 0, false); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { Maticsoft.BLL.tSet bll = new Maticsoft.BLL.tSet(); model = bll.GetModel(1); HtmlMeta keywords = new HtmlMeta(); keywords.Name = "keywords"; keywords.Content = model.KeyWords; this.Page.Header.Controls.Add(keywords); HtmlMeta description = new HtmlMeta(); description.Name = "description"; description.Content = model.Description; this.Page.Header.Controls.Add(description); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { Maticsoft.BLL.tSet bll = new Maticsoft.BLL.tSet(); Maticsoft.Model.tSet model = bll.GetModel(1); if (model != null) { Address.Text = model.Address; BeiAn.Text = model.BeiAn; Copyright.Text = model.Copyright; Description.Text = model.Description; Email.Text = model.Email; KeyWords.Text = model.KeyWords; Tel.Text = model.Tel; WebName.Text = model.WebName; } } }