protected void btnUpdate_Click(object sender, EventArgs e) { loginName = ViewState["loginName"].ToString(); policy = bll.GetModel(int.Parse(policyId.Value.ToString())); policy.Chineseintroduced = txtChina.Text.Trim(); policy.Englishintroduction = txtEnglish.Text.Trim(); if (string.IsNullOrEmpty(policy.htmlUrl)) { policy.htmlUrl = "Preferentialpolicies.htm"; } if (bll.Update(policy)) { PolicyStatic sta = new PolicyStatic(); if (sta.StaticHtml(int.Parse(policyId.Value.ToString()), loginName) <= 0) { Response.Write("<script>alert('修改失败!');</script>"); //Response.Write("<script>alert('修改失败!');document.location='Addpolicy.aspx'</script>"); } else { //AreaIndexBLL areaBll = new AreaIndexBLL(); //areaBll.AreaHtml(loginName, 8); sta.StaticHtml(loginName); Response.Write("<script>alert('修改成功!');location.href='PolicyManage.aspx';</script>"); } } else { Response.Write("<script>alert('修改失败!');</script>"); } }
protected void Button1_Click(object sender, EventArgs e) { loginName = ViewState["loginName"].ToString(); policy.loginName = loginName; policy.Chineseintroduced = txtChina.Text.Trim(); policy.Englishintroduction = txtEnglish.Text.Trim(); policy.htmlUrl = "Preferentialpolicies.htm"; int num = bll.Add(policy); if (num > 0) { policyId.Value = num.ToString(); PolicyStatic sta = new PolicyStatic(); if (sta.StaticHtml(num, loginName) <= 0) { Response.Write("<script>alert('添加失败!');</script>"); } else { //Response.Redirect("Addpolicy.aspx"); //AreaIndexBLL areaBll = new AreaIndexBLL(); //areaBll.AreaHtml(loginName,8); sta.StaticHtml(loginName); btnUpdate.Visible = true; Button1.Visible = false; Response.Write("<script>alert('添加成功!');</script>"); } } else { Response.Write("<script>alert('添加失败!');</script>"); } }
public void GenerateStatic(string name) { //产业优势 如果ID为0就是通过用户名查找 PolicyStatic policySta = new PolicyStatic(); policySta.StaticHtml(0, name); //产业优势右边iframe policySta.StaticHtml(name); //投资成本如果ID为0就是通过用户名查找 StaticInvest InvestSta = new StaticInvest(); InvestSta.StaticHtml(0, name); //产业优势 StaticProduct ProductSta = new StaticProduct(); ProductSta.StaticHtml(0, name); //产业优势Ifrom StaticIF staticIf = new StaticIF(); staticIf.StaticHtml(name, 3); //staticIf.StaticHtml(name, 1); //园区特色 StaticPark ParkSta = new StaticPark(); ParkSta.StaticHtml(0, name); //联系方式 ContactStatic sta = new ContactStatic(); sta.StaticHtml(name); //区域概况 GZS.BLL.AreaTabBLL areatabbll = new GZS.BLL.AreaTabBLL(); int sdsas = areatabbll.StaticHtml(0, name); //IF areatabbll.StaticHtmls(name); //投资环境 GZS.BLL.EnvironmentTabBLL envtabbll = new GZS.BLL.EnvironmentTabBLL(); envtabbll.StaticHtml(name); //IF envtabbll.StaticHtmls(name); //友情链接 GZS.BLL.FriendLinkBLL bll = new GZS.BLL.FriendLinkBLL(); bll.StaticHtml(name); //相册列表 GZS.BLL.ImageTabMBLL imagebll = new GZS.BLL.ImageTabMBLL(); List <GZS.Model.ImageTabM> list = imagebll.GetAll(name); for (int i = 0; i < list.Count; i++) { imagebll.StaticHtmls(list[i].imageid, name); imagebll.StaticHtml(list[i].imageid, name); } imagebll.StaticHtmlshouye(name); //资讯 NewsTabBLL newstabbll = new NewsTabBLL(); PageStatic statics = new PageStatic(); List <GZS.Model.news.NewsTab> list1 = newstabbll.GetNewsTabAllByUserName(name); for (int i = 0; i < list1.Count; i++) { int row = statics.StaticHtml(list1[i].Newsid, name); } int dzx = statics.StaticHtmls(name); int daze = newstabbll.StaticHtml(name); GZS.BLL.VideoSysBLL Videobll = new GZS.BLL.VideoSysBLL(); List <GZS.Model.VideoSysM> lista = Videobll.GetAllModel(name); GZS.BLL.VideoSysPagestaticBLL staticblls = new GZS.BLL.VideoSysPagestaticBLL(); for (int i = 0; i < lista.Count; i++) { staticblls.StaticHtml(lista[i].videoid, name); } }