/// <summary> /// 删除自定义结点 /// </summary> public void UserNode_Del() { if (!EX_Admin.Power("node_del", "删除自定义结点")) { EX_Admin.NoPower(); return; } string ids = RequestTool.RequestString("ids"); string PageCode = RequestTool.RequestString("PageCode"); if (ids != "") { List <Lebi_Node> nodes = B_Lebi_Node.GetList("id in (lbsql{" + ids + "})", ""); foreach (Lebi_Node node in nodes) { B_Lebi_Node.Delete("id=" + node.id + " or parentid=" + node.id + ""); B_Lebi_Page.Delete("Node_id=" + node.id + ""); } string action = Tag("删除自定义结点"); string description = ""; Log.Add(action, "Node", ids, CurrentAdmin, description); } if (PageCode == "P_Help") { Lebi_Theme_Page themepage = B_Lebi_Theme_Page.GetModel("Code='P_Help'"); if (themepage.Type_id_PublishType == 122) { PageStatic.Greate_Help(themepage); } } Response.Write("{\"msg\":\"OK\"}"); }
//生成 protected void btnpublic_Click(object sender, EventArgs e) { string[] values = Request.Form.GetValues("cbxSelect"); if (values == null || values.Length < 1) { Tz888.Common.MessageBox.Show(this.Page, "请选择要静态化的资源!"); return; } else { int result = 0; StringBuilder sb = new StringBuilder(); foreach (string str in values) { report = reporttabbll.GetModel(int.Parse(str.ToString().Trim())); if (report.Auditid == 1) { PageStatic stat = new PageStatic(); result = stat.StaticHtml(int.Parse(str.ToString().Trim())); if (result <= 0) { Tz888.Common.MessageBox.Show(this.Page, "生成静态页面失败"); } } } if (result > 0) { Tz888.Common.MessageBox.Show(this.Page, "生成成功"); } else { Tz888.Common.MessageBox.Show(this.Page, "生成失败"); } BindShow(); } }
//审核 protected void btnSubmit_Click(object sender, EventArgs e) { ProfessionalinfoTab MainInfo = new ProfessionalinfoTab(); Professionalview viewInfo = new Professionalview(); ProfessionalLink personInfo = new ProfessionalLink(); if (!string.IsNullOrEmpty(Request.QueryString["ProfessionalID"])) { int ProfessionalID = int.Parse(Request.QueryString["ProfessionalID"].ToString()); MainInfo.ProfessionalID = ProfessionalID; MainInfo = infoBll.GetModel(ProfessionalID); } MainInfo.Titel = txtTitle.Text.Trim(); //0未审核 1审核通过2审核未通过 if (rdPass.Checked) { MainInfo.auditId = 1; } else if (rdAudit.Checked) { MainInfo.auditId = 0; } else if (rdNopass.Checked) { MainInfo.auditId = 2; } else { MainInfo.auditId = 4; } //是否收费 0 免费 1收费 if (rdomian.Checked) { MainInfo.chargeId = 0; } else { MainInfo.chargeId = 1; } //来源 1 会员中心 2 业务员 //MainInfo.FromId = int.Parse(ddlFrom.SelectedValue.ToString()); //类型 1 需要服务2提供专业 3专业人才 //if (rdoService.Checked) { MainInfo.typeID = 1; } else if (rdoPress.Checked) { MainInfo.typeID = 2; } else { MainInfo.typeID = 3; } //状态 0无效 1有效 2已过期 if (rdoNoEnable.Checked) { MainInfo.stateId = 0; } else if (rdoYesEnable.Checked) { MainInfo.stateId = 1; } else { MainInfo.stateId = 2; } //是否推荐 不推荐 0 推荐 1 if (rdoYesAct.Checked) { MainInfo.recommendId = 1; } else { MainInfo.recommendId = 0; } MainInfo.price = Convert.ToDecimal(txtPrice.Text.ToString()); MainInfo.refreshTime = Convert.ToDateTime(txtReTime.Text.Trim().ToString()); MainInfo.FeedBackNote = tbAuditingRemark.Text.Trim(); MainInfo.clickId = int.Parse(txtClick.Text.Trim().ToString()); MainInfo.Titel = txtTitle.Text.Trim(); MainInfo.htmlUrl = "dservice/" + DateTime.Now.ToString("yyyyMM") + "/dservice" + DateTime.Now.ToString("yyyyMMdd") + "_" + Request.QueryString["ProfessionalID"].ToString() + ".shtml"; viewInfo.CountryCode = this.ZoneSelectControl1.CountryID; viewInfo.ProvinceID = this.ZoneSelectControl1.ProvinceID; viewInfo.CityID = this.ZoneSelectControl1.CityID; viewInfo.CountyID = this.ZoneSelectControl1.CountyID; viewInfo.description = txtContent.Text.Trim(); viewInfo.title = txtWtitle.Text.Trim(); viewInfo.keywords = txtKeyword1.Text.Trim(); viewInfo.Webdescription = txtWebDesr.Text.Trim(); viewInfo.validityID = int.Parse(rdlValiditeTerm.SelectedValue.ToString()); viewInfo.typeID = int.Parse(ddlServiceType.SelectedValue.ToString()); personInfo.Address = txtAddress.Text.Trim(); personInfo.CompanyName = txtCompany.Text.Trim(); personInfo.Email = txtEmail.Text.Trim(); personInfo.Fax = txtFax.Text.Trim(); personInfo.phone = txtPhone.Text.Trim(); string tel = string.Empty; if (!string.IsNullOrEmpty(txtcontactsTel.Text.Trim())) { tel = txtcontactsTel.Text.Trim() + ","; } else { tel = ","; } if (!string.IsNullOrEmpty(txtTel.Text.Trim())) { tel += txtTel.Text.Trim() + ","; } else { tel += ","; } if (!string.IsNullOrEmpty(txttel2.Text.Trim())) { tel += txttel2.Text.Trim() + ","; } else { tel += ","; } personInfo.Tel = tel; personInfo.UserName = txtLinkMan.Text.Trim(); personInfo.Site = txtSite.Text.Trim(); if (viewbll.UpdateProFessionlView(MainInfo, viewInfo, personInfo)) { if (rdPass.Checked) { Tz888.BLL.ProfessionalManage.PageStatic stat = new PageStatic(); int result = stat.StaticHtml(int.Parse(Request.QueryString["ProfessionalID"].ToString())); if (result <= 0) { Tz888.Common.MessageBox.Show(this.Page, "生成静态页面失败"); } } Response.Write("<script>alert('审核成功!');document.location='ProfessionalManage.aspx'</script>"); } else { Tz888.Common.MessageBox.Show(this.Page, "审核失败!"); } }
/// <summary> /// 编辑页面 /// </summary> public void Page_Edit() { int id = RequestTool.RequestInt("id", 0); Lebi_Page model = B_Lebi_Page.GetModel(id); if (model == null) { model = new Lebi_Page(); } B_Lebi_Page.BindForm(model); model.Language_ids = RequestTool.RequestSafeString("Language_ids"); model.Language = Language.LanuageidsToCodes(model.Language_ids); if (model.id == 0) { if (!EX_Admin.Power("page_add", "添加结点内容")) { AjaxNoPower(); return; } B_Lebi_Page.Add(model); id = B_Lebi_Page.GetMaxId(); string action = Tag("添加结点内容"); string description = model.Name; Log.Add(action, "Page", id.ToString(), CurrentAdmin, description); } else { if (!EX_Admin.Power("page_edit", "编辑结点内容")) { AjaxNoPower(); return; } B_Lebi_Page.Update(model); string action = Tag("编辑结点内容"); string description = model.Name; Log.Add(action, "Page", id.ToString(), CurrentAdmin, description); } //========================================= //处理静态页面 Lebi_Node node = B_Lebi_Node.GetModel(model.Node_id); Lebi_Theme_Page themepage; if (node.Code == "About") { themepage = B_Lebi_Theme_Page.GetModel("Code='P_About'"); } else if (node.Code == "News") { themepage = B_Lebi_Theme_Page.GetModel("Code='P_NewsDetails'"); } else if (node.Code == "Help") { themepage = B_Lebi_Theme_Page.GetModel("Code='P_Help'"); } else { themepage = B_Lebi_Theme_Page.GetModel("Code='P_ArticleDetails'"); } if (themepage.Type_id_PublishType == 122)//静态发布页面 { if (node.Code == "Help") { PageStatic.Greate_Help(themepage); } else { PageStatic.Greate_InfoPage(model, themepage); } } ImageHelper.LebiImagesUsed(model.ImageOriginal, "page", id); Response.Write("{\"msg\":\"OK\",\"id\":\"" + id + "\"}"); }
protected void btnAudit_Click(object sender, EventArgs e) { maModel = maBll.GetModel(int.Parse(Request.QueryString["id"].ToString())); maModel.Reportname = txtName.Text.Trim(); viewModel.Title = txtWtitle.Text.Trim(); viewModel.Keywords = txtKeyword1.Text.Trim(); viewModel.Description = txtWebDesr.Text.Trim(); maModel.Bigtypeid = int.Parse(ddlbig.SelectedValue.ToString()); maModel.Smalltypeid = int.Parse(ddlSmall.SelectedValue.ToString()); maModel.Effectivedata = ddlbegin.SelectedValue.ToString(); maModel.Invaliddata = ddlend.SelectedValue.Trim().ToString(); maModel.FormID = int.Parse(ddrFrom.SelectedValue.ToString()); //if (!string.IsNullOrEmpty(Request.QueryString["id"]))//修改 //{ // maModel.ReportID = int.Parse(Request.QueryString["id"].ToString()); //} if (rdomian.Checked) { maModel.Charges = 0;//是否收费 0不收费 1 收费 } else { maModel.Charges = 1; } string prices = string.Empty; if (rdoShou.Checked) { if (rdoDian.Checked) { string dain = string.Empty; if (string.IsNullOrEmpty(txtDian.Text.Trim())) { dain = "0"; } else { dain = txtDian.Text.Trim(); } //prices = rdoDian.Text + ":" + dain + "|"; prices = "1" + ":" + dain + "|"; } else { prices += ":|"; } if (rdoying.Checked) { string dain = string.Empty; if (string.IsNullOrEmpty(txtying.Text.Trim())) { dain = "0"; } else { dain = txtying.Text.Trim(); } //prices += rdoying.Text + ":" + dain + "|"; prices += "2" + ":" + dain + "|"; } else { prices += ":|"; } if (rdoDianying.Checked) { string dain = string.Empty; if (string.IsNullOrEmpty(txtDianying.Text.Trim())) { dain = "0"; } else { dain = txtDianying.Text.Trim(); } //prices += rdoDianying.Text + ":" + dain + "|"; prices += "3" + ":" + dain + "|"; } else { prices += ":|"; } if (rdoYinguang.Checked) { string dain = string.Empty; if (string.IsNullOrEmpty(txtYinguang.Text.Trim())) { dain = "0"; } else { dain = txtYinguang.Text.Trim(); } //prices += rdoYinguang.Text + ":" + dain + "|"; prices += "4" + ":" + dain + "|"; } else { prices += ":|"; } } else { maModel.Price = ""; } maModel.Price = prices; maModel.OverTime = txtOverTime.Text.Trim(); viewModel.Paytype = txtPay.Text.Trim(); if (!string.IsNullOrEmpty(txtPhotoCount.Text.Trim())) { viewModel.Chartcount = int.Parse(txtPhotoCount.Text.Trim().ToString()); } else { viewModel.Chartcount = 0; } if (!string.IsNullOrEmpty(txtYeCount.Text.Trim())) { viewModel.Pagecount = int.Parse(txtYeCount.Text.Trim().ToString()); } else { viewModel.Pagecount = 0; } viewModel.Writing = txtWriterCompany.Text.Trim(); //撰写单位 viewModel.Publishingdate = txtPublishDate.Text.Trim(); maModel.Explain = txtExplain.Text.Trim(); //摘要 if (string.IsNullOrEmpty(maModel.Html)) { maModel.Html = "htmlLink/" + DateTime.Now.ToString("yyyyMM") + "/" + DateTime.Now.ToString("yyyyMMdd") + int.Parse(Request.QueryString["id"].ToString()) + ".shtml"; } viewModel.Message = txtMessage.Text.Trim(); if (rdoNoAct.Checked)//是否推荐0:不1:推荐 { maModel.RecommendID = 0; } else { maModel.RecommendID = 1; } if (rdPass.Checked)//审核状态 0未审 1已审 { maModel.Auditid = 1; } else { maModel.Auditid = 0; } if (!viewBll.UpdateReport(maModel, viewModel)) { Response.Write("<script>alert('审核失败!');document.location='reportList.aspx'</script>"); } else { if (rdPass.Checked) { PageStatic stat = new PageStatic(); int result = stat.StaticHtml(int.Parse(Request.QueryString["id"].ToString())); if (result <= 0) { Tz888.Common.MessageBox.Show(this.Page, "生成静态页面失败"); } } Response.Write("<script>alert('修改成功!');document.location='reportList.aspx'</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); } }