public void BindData() { List <Model.SiteInfo> list = SiteInfoBll.GetSiteInfo(); if (list.Count > 0) { hfId.Value = list[0].SiteInfoId.ToString(); txtSiteTitle.Text = list[0].SiteTitle.ToString(); txtKeyWords.Text = list[0].SiteKey.ToString(); txtDescription.Text = list[0].SiteDes; txtUrl.Text = list[0].SiteUrl; txtCompany.Text = list[0].CompanyName; txtAdress.Text = list[0].Adress; txtPostCode.Text = list[0].PostCode; txtLinkMan.Text = list[0].Contacts; txtTel.Text = list[0].Tel; txtPhone.Text = list[0].Phone; txtFax.Text = list[0].Fax; txtEmail.Text = list[0].Email; txtRecord.Text = list[0].Record; txtStatCode.Text = list[0].StatCode; txtBgsound.Text = list[0].BgsoundUrl; if (list[0].LogoUrl != "") { txtLogo.Text = "/" + list[0].LogoUrl; } else { txtLogo.Text = ""; } hfImgUrl.Value = list[0].LogoUrl; } }
protected void Page_Load(object sender, EventArgs e) { if (Session["Admin"] == null || Session["Admin"].ToString() == "") { Response.Redirect("Index.aspx"); List <Model.SiteInfo> list = SiteInfoBll.GetSiteInfo(); if (list.Count > 0) { ltlTitle.Text = list[0].SiteTitle + "后台管理系统"; } } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { Session.Clear(); List <Model.SiteInfo> list = SiteInfoBll.GetSiteInfo(); if (list.Count > 0) { ltlTitle.Text = list[0].SiteTitle + "后台管理系统登陆"; } } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { if (Session["AdminId"] != null && Session["AdminId"].ToString() != "") { BindData(); List <Model.SiteInfo> list = SiteInfoBll.GetSiteInfo(); if (list.Count > 0) { ltlTitle.Text = list[0].SiteTitle + "-后台管理系统"; } } else { } } }