public string Content_API() { string action = Request.Query["action"]; switch (action) { case "duptitle": DataTable dt = contentBll.GetByDupTitle(Request.Query["value"]); return(Newtonsoft.Json.JsonConvert.SerializeObject(dt)); default: return(""); } }
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) { if (function.isAjax()) { string action = Request["action"]; string value = Request["value"].Trim(); 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(); } DataSet ds = new DataSet(); if (ModelID > 0 && NodeID > 0) { ds = mfieldBll.GetProModelFieldS(ModelID.ToString()); bt_txt.Text = GetAlias("Title", ds.Tables[0]); hits_txt.Text = GetAlias("Hits", ds.Tables[0]); gjz_txt.Text = GetAlias("Tagkey", ds.Tables[0]); tj_txt.Text = GetAlias("EliteLevel", ds.Tables[0]); zht_txt.Text = GetAlias("Status", ds.Tables[0]); gx_time.Text = GetAlias("UpDateTime", ds.Tables[0]); Label4.Text = GetAlias("Subtitle", ds.Tables[0]); py.Text = GetAlias("PYtitle", ds.Tables[0]); if (spbll.GetSpecList().Rows.Count > 0) { SpecInfo_Li.Text = "<button type='button' class='btn btn-primary' onclick='ShowSpDiag()'>添加至专题</button>"; } else { SpecInfo_Li.Text = "<div style='margin:5px;' class='btn btn-default disabled'><span class='glyphicon glyphicon-info-sign'></span> 尚未定义专题</div>"; } 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(); B_Admin AdminBll = new B_Admin(); M_AdminInfo adminMod = adminBll.GetAdminLogin(); ddlFlow.SelectedValue = adminMod.DefaultStart.ToString(); //if (ddlDT.TableName.Equals("Default")) //{ // ddlFlow.SelectedValue = "99"; //} //else //{ // ddlFlow.Items[0].Selected = true; //} //----- nodeMod = nodeBll.GetNodeXML(NodeID); NodeDir = nodeMod.NodeDir; if (nodeMod.ListPageHtmlEx < 3) { CreateHTML.Visible = true; } else { CreateHTML.Visible = false; } #region 节点权限 adminMod = adminBll.GetAdminLogin(); if (!("," + adminMod.RoleList + ",").Contains(",1,") && adminMod.NodeRole != 0) { DataTable dt = roleBll.SelectNodeRoleName(adminMod.NodeRole); if (dt.Rows.Count > 0) { IList <string[]> liss = new List <string[]>(); for (int i = 0; i < dt.Rows.Count; i++) { string[] nodeM = new string[2]; nodeM[0] = dt.Rows[i]["nodeid"].ToString(); nodeM[1] = dt.Rows[i]["Columns"].ToString(); liss.Add(nodeM); } string bb = nodeBll.stringTreeNodeRole(0, "", liss); if (checknode(bb, NodeID)) { if (!GetRole("addTo")) { function.WriteErrMsg("你无权限添加信息", "ContentManage.aspx?NodeID=" + NodeID.ToString()); } } else { function.WriteErrMsg("你无权限添加信息", "ContentManage.aspx?NodeID=" + NodeID.ToString()); } } } #endregion nodeMod = nodeBll.GetNodeXML(NodeID); //CheckNode(nodeMod); if (nodeMod.Contribute != 1) { function.Script(this, "ShowSys();"); } Call.SetBreadCrumb(Master, "<li><a href='" + CustomerPageAction.customPath2 + "I/Main.aspx'>工作台</a></li><li><a href='ContentManage.aspx'>内容管理</a></li><li><a href='ContentManage.aspx?NodeID=" + nodeMod.NodeID + "'>" + nodeMod.NodeName + "</a></li><li class='active'>添加内容</li><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>"); //Label2.Text = "<a href='ContentManage.aspx?Nodeid=" + nodeMod.NodeID + "'>" + nodeMod.NodeName + "</a>"; nodename.Value = nodeMod.NodeName; //txtNode.Text = nodeMod.NodeName; //hfNode.Value = NodeID + ","; M_ModelInfo model = modelBll.GetModelById(ModelID); Label1.Text = "添加" + model.ItemName; EBtnSubmit.Text = "添加" + model.ItemName; Title_L.Text = "添加" + model.ItemName; ModelHtml.Text = mfieldBll.GetInputallHtml(ModelID, NodeID); txtAddTime.Text = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); txtdate.Text = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); BindTempList(); } } else { function.WriteErrMsg("参数错误!!"); } }
protected void Page_Load(object sender, EventArgs e) { if (function.isAjax()) { string action = Request["action"]; string value = Request["value"].Trim(); 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(); } DataTable ds = new DataTable(); if ((ModelID > 0 && NodeID > 0) || GeneralID > 0) { M_CommonData commdata = new M_CommonData(); int nodeid = 0, modelid = 0; if (GeneralID > 0) { commdata = contentBll.GetCommonData(this.GeneralID); nodeid = commdata.NodeID; modelid = commdata.ModelID; } else { nodeid = NodeID; modelid = ModelID; } ds = mfieldBll.SelByModelID(modelid, true); bt_txt.Text = GetAlias("Title", ds); gjz_txt.Text = GetAlias("Tagkey", ds); Label4.Text = GetAlias("Subtitle", ds); py.Text = GetAlias("PYtitle", ds); if (spbll.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>"; } if (!IsPostBack) { if (!string.IsNullOrEmpty(Request.QueryString["Source"])) { function.Script(this, "SetContent();"); } 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();"); } nodename.Value = nodeMod.NodeName; M_ModelInfo model = modelBll.GetModelById(modelid); string optionstr = GeneralID > 0 ? "修改" : "添加"; this.Tips_L.Text = "向" + nodeMod.NodeName + "节点" + optionstr + model.ItemName; this.Node_L.Text = this.nodeBll.GetNodeXML(nodeid).NodeName; content_tite.InnerText = optionstr + "内容"; Label1.Text = optionstr + model.ItemName; EBtnSubmit.Text = optionstr + model.ItemName; //if (GeneralID>0) //{ // MyBind(commdata); // GetNodePreate(nodeid, buser.GetLogin()); //} //else //{ ModelHtml.Text = mfieldBll.InputallHtml(modelid, nodeid, new ModelConfig() { Source = ModelConfig.SType.UserContent }); //} } } else { function.WriteErrMsg("参数错误!!"); } }
protected void Page_Load(object sender, EventArgs e) { if (function.isAjax()) { string action = Request["action"]; string value = Request["value"].Trim(); 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(); } DataSet ds = new DataSet(); if (ModelID > 0 && NodeID > 0) { ds = mfieldBll.GetProModelFieldS(ModelID.ToString()); bt_txt.Text = GetAlias("Title", ds.Tables[0]); gjz_txt.Text = GetAlias("Tagkey", ds.Tables[0]); Label4.Text = GetAlias("Subtitle", ds.Tables[0]); py.Text = GetAlias("PYtitle", ds.Tables[0]); if (spbll.GetSpecList().Rows.Count > 0) { SpecInfo_Li.Text = "<button type='button' class='btn btn-primary' onclick='ShowSpDiag()'>添加至专题</button>"; } else { SpecInfo_Li.Text = "<div style='margin:5px;' class='btn btn-default disabled'><span class='glyphicon glyphicon-info-sign'></span> 尚未定义专题</div>"; } if (!IsPostBack) { if (!string.IsNullOrEmpty(Request.QueryString["Source"])) { function.Script(this, "SetContent();"); } 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();"); } nodename.Value = nodeMod.NodeName; M_ModelInfo model = modelBll.GetModelById(ModelID); Label1.Text = "添加" + model.ItemName; EBtnSubmit.Text = "添加" + model.ItemName; Title_L.Text = "添加" + model.ItemName; ModelHtml.Text = mfieldBll.InputallHtml(ModelID, NodeID, new ModelConfig() { Source = ModelConfig.SType.UserContent }); } } else { function.WriteErrMsg("参数错误!!"); } }