protected void Page_Load(object sender, EventArgs e) { if (function.isAjax()) { string action = Request["action"] ?? ""; string value = Request["value"] ?? ""; string result = ""; switch (action) { case "duptitle": DataTable dt = contentBll.GetByDupTitle(value); result = Newtonsoft.Json.JsonConvert.SerializeObject(dt); break; } Response.Write(result); Response.Flush(); Response.End(); } if (ModelID < 1 || NodeID < 1) { function.WriteErrMsg("参数错误"); } DataTable fieldDT = fieldBll.SelByModelID(ModelID, true); bt_txt.Text = B_Content.GetFieldAlias("Title", fieldDT) + ":"; gjz_txt.Text = B_Content.GetFieldAlias("Tagkey", fieldDT) + ":"; Label4.Text = B_Content.GetFieldAlias("Subtitle", fieldDT) + ":"; tj_txt.Text = B_Content.GetFieldAlias("EliteLevel", fieldDT); zht_txt.Text = B_Content.GetFieldAlias("Status", fieldDT); gx_time.Text = B_Content.GetFieldAlias("UpDateTime", fieldDT); hits_txt.Text = B_Content.GetFieldAlias("Hits", fieldDT); if (!IsPostBack) { B_ARoleAuth.CheckEx(ZLEnum.Auth.content, "ContentMange"); if (!string.IsNullOrEmpty(Request.QueryString["Source"])) { function.Script(this, "SetContent();"); } //-----工作流,检测该节点是否绑定工作流,如无绑定,则直接通过,未绑定,则以第一步为准 contentsk.Visible = B_ARoleAuth.Check(ZLEnum.Auth.content, "ContentMange"); DataTable ddlDT = proBll.SelByNodeID2(NodeID); ddlFlow.DataSource = ddlDT; ddlFlow.DataTextField = "PName"; ddlFlow.DataValueField = "PPassCode"; ddlFlow.DataBind(); M_AdminInfo adminMod = B_Admin.GetLogin(); ddlFlow.SelectedValue = adminMod.DefaultStart.ToString(); //if (ddlDT.TableName.Equals("Default")) //{ // ddlFlow.SelectedValue = "99"; //} //else //{ // ddlFlow.Items[0].Selected = true; //} //----- //专题 if (spbll.GetFirstID() > 0) { SpecInfo_Li.Text = "<button type='button' class='btn btn-info btn-sm' onclick='ShowSpDiag()'>" + Resources.L.添加至专题 + "</button>"; } else { SpecInfo_Li.Text = "<div style='margin:5px;' class='btn btn-default disabled'><span class='fa fa-info-circle'></span> " + Resources.L.尚未定义专题 + "</div>"; } //智能关键词 keys = keyBll.SelToJson(); //------ nodeMod = nodeBll.GetNodeXML(NodeID); NodeDir = nodeMod.NodeDir; if (nodeMod.ListPageHtmlEx < 3) { CreateHTML.Visible = true; } else { CreateHTML.Visible = false; } nodeMod = nodeBll.GetNodeXML(NodeID); if (nodeMod.Contribute != 1) { function.Script(this, "ShowSys();"); } M_ModelInfo model = modelBll.GetModelById(ModelID); Label1.Text = "添加" + model.ItemName; EBtnSubmit.Text = "添加" + model.ItemName; Title_L.Text = "添加" + model.ItemName; ModelHtml.Text = fieldBll.InputallHtml(ModelID, NodeID, new ModelConfig() { Source = ModelConfig.SType.Admin }); txtAddTime.Text = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); txtdate.Text = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); BindTempList(); string bread = "<li><a href='" + CustomerPageAction.customPath2 + "I/Main.aspx'>" + Resources.L.工作台 + "</a></li><li><a href='ContentManage.aspx'>" + Resources.L.内容管理 + "</a></li><li><a href='ContentManage.aspx?NodeID=" + nodeMod.NodeID + "'>" + nodeMod.NodeName + "</a></li>"; bread += "<li class='active'>[向本栏目添加" + model.ItemName + "]</li>"; bread += "<div class='pull-right hidden-xs'> <span> <a href='" + customPath2 + "Content/SchedTask.aspx' title='" + Resources.L.查看计划任务 + "'><span class='fa fa-clock-o' style='color:#28b462;'></span></a>" + GetOpenView() + "<span onclick=\"ShowDiag('EditNode.aspx?NodeID=" + NodeID + "','" + Resources.L.配置本节点 + "');\" class='fa fa-cog' title='" + Resources.L.配置本节点 + "' style='cursor:pointer;margin-left:5px;'></span></span></div>"; Call.SetBreadCrumb(Master, bread); } }
protected void Page_Load(object sender, EventArgs e) { B_Admin badmin = new B_Admin(); if (!IsPostBack) { B_ARoleAuth.CheckEx(ZLEnum.Auth.content, "ContentMange"); M_CommonData Cdata = contentBll.GetCommonData(GeneralID); //计划任务(审核时间) M_Content_ScheTask taskmod = taskBll.SelByGid(GeneralID, M_Content_ScheTask.TaskTypeEnum.AuditArt); if (taskmod != null) { CheckDate_T.Text = taskmod.ExecuteTime2.ToString(); CheckDate_Hid.Value = taskmod.ExecuteTime2.ToString(); } taskmod = taskBll.SelByGid(GeneralID, M_Content_ScheTask.TaskTypeEnum.UnAuditArt); if (taskmod != null) { TimeDate_T.Text = taskmod.ExecuteTime2.ToString(); TimeDate_Hid.Value = taskmod.ExecuteTime2.ToString(); } M_ModelInfo model = bmode.GetModelById(Cdata.ModelID); ModelID = Cdata.ModelID; NodeID = Cdata.NodeID; DataTable fieldDT = fieldBll.SelByModelID(ModelID, true); bt_txt.Text = GetAlias("Title", fieldDT) + ":"; gjz_txt.Text = GetAlias("Tagkey", fieldDT) + ":"; SubTitle_L.Text = GetAlias("Subtitle", fieldDT) + ":"; tj_txt.Text = GetAlias("EliteLevel", fieldDT); zht_txt.Text = GetAlias("Status", fieldDT); hits_txt.Text = GetAlias("Hits", fieldDT); RelatedIDS_Hid.Value = Cdata.RelatedIDS; Button1.Text = "添加为新" + model.ItemName; EBtnSubmit.Text = "保存" + model.ItemName; //-----工作流,检测该节点是否绑定工作流,如无绑定,则直接通过,未绑定,则以第一步为准 ddlFlow.DataSource = proBll.SelByNodeID2(NodeID); ddlFlow.DataTextField = "PName"; ddlFlow.DataValueField = "PPassCode"; ddlFlow.DataBind(); ddlFlow.SelectedValue = Cdata.Status.ToString().Equals("-3") || string.IsNullOrEmpty(Cdata.Status.ToString()) ? "0" : Cdata.Status.ToString(); //-----工作流(End) //-----智能关键词 keys = keyBll.SelToJson(); ModelID = Cdata.ModelID; M_Node nnn = bnode.GetNodeXML(NodeID); if (nnn.Contribute != 1) { function.Script(this, "ShowSys();"); } NodeDir = nnn.NodeDir; CreateHTML.Visible = nnn.ListPageHtmlEx < 3; nodename.Value = nnn.NodeName; EBtnSubmit.Text = "修改" + bmode.GetModelById(ModelID).ItemName; txtTitle.Text = Cdata.Title; SeledPic_Hid.Value = Cdata.TopImg; txtAddTime.Text = Cdata.CreateTime == DateTime.MinValue ? "" : Cdata.CreateTime.ToString("yyyy-MM-dd HH:mm:ss"); txtInputer.Text = Cdata.Inputer; txtdate.Text = Cdata.UpDateTime.ToString("yyyy-MM-dd HH:mm:ss"); txtNum.Text = Cdata.Hits.ToString(); ChkAudit.Checked = Cdata.EliteLevel > 0; TxtTemplate_hid.Value = Cdata.Template; TlpView_Tlp.SelectedID = Cdata.Template; TlpView_Tlp.SelectedValue = Cdata.Template; Keywords.Text = Cdata.TagKey; Subtitle.Text = Cdata.Subtitle; PYtitle.Text = Cdata.PYtitle; pronum.Text = Cdata.Pronum.ToString(); proweek.Text = Cdata.ProWeek.ToString(); BidType.SelectedValue = Cdata.BidType.ToString(); bidmoney.Text = Cdata.BidMoney.ToString("F2"); ThreadStyle.Value = Cdata.TitleStyle.ToString(); txtTitle.Style.Value += Cdata.TitleStyle.ToString(); IsComm_Radio.SelectedValue = Cdata.IsComm.ToString(); #region 专题 if (specbll.GetSpecList().Rows.Count > 0) { SpecInfo_Li.Text = "<button type='button' class='btn btn-info btn-sm' onclick='ShowSpDiag()'>添加至专题</button>"; } else { SpecInfo_Li.Text = "<div style='margin:5px;' class='btn btn-default disabled'><span class='glyphicon glyphicon-info-sign'></span> 尚未定义专题</div>"; } Spec_Hid.Value = Cdata.SpecialID; if (!string.IsNullOrEmpty(Cdata.SpecialID)) { string ids = Cdata.SpecialID.Trim(','); DataTable dtspecs = specbll.SelByIDS(ids); string names = ""; if (dtspecs != null) { foreach (DataRow item in dtspecs.Rows) { names += "{\"id\":\"" + item["SpecID"] + "\",\"name\":\"" + item["SpecName"] + "\"},"; } } names = names.TrimEnd(','); function.Script(this, "DealResult('[" + names + "]');"); } #endregion DataTable dtContent = contentBll.GetContent(GeneralID); ModelHtml.Text = fieldBll.InputallHtml(ModelID, NodeID, new ModelConfig() { ValueDT = dtContent });//模型内容 //检测是否已生成PDF或Html if (File.Exists(Server.MapPath(Cdata.PdfLink))) { makePDFBtn.Enabled = false; downPdfHref.Text += Cdata.GeneralID + ".pdf"; delPdfHref.Visible = true; downPdfHref.Visible = true; } if (File.Exists(Server.MapPath(wordLink + Cdata.GeneralID + ".doc"))) { makeWordBtn.Enabled = false; downWordHref.Text += Cdata.GeneralID + ".doc"; downWordHref.Visible = true; delWordHref.Visible = true; } string breadTlp = "<li><a href='ContentManage.aspx'>内容管理</a></li><li><a href='ContentManage.aspx?NodeID=" + nnn.NodeID + "'>" + nnn.NodeName + "</a></li><li class='active'>"; breadTlp += "[向本栏目修改" + model.ItemName + "]"; if (!string.IsNullOrEmpty(Cdata.Template))//启用个性模板 { breadTlp += "<span class='margin_l5 rd_red'>(提示:该内容已启用个性模板)</span>"; } breadTlp += "</li>"; breadTlp += "<div class='pull-right hidden-xs'><span><a href='" + customPath2 + "Content/SchedTask.aspx' title='查看计划任务'><span class='glyphicon glyphicon-time' style='color:#28b462;'></span></a>" + GetOpenView() + "<span onclick=\"ShowDiag('EditNode.aspx?NodeID=" + NodeID + "','配置本节点');\" class='glyphicon glyphicon-cog' title='配置本节点' style='cursor:pointer;margin-left:5px;'></span></span></div>"; Call.SetBreadCrumb(Master, breadTlp); BindTempList(); } }