//更新计划任务 public void UpdateSched(int gid, M_Content_ScheTask.TaskTypeEnum type, string datetext) { M_Content_ScheTask taskmod = taskBll.SelByGid(GeneralID, type); if (!string.IsNullOrEmpty(datetext)) { if (taskmod == null) { taskmod = new M_Content_ScheTask(); } taskmod.TaskType = (int)type; taskmod.TaskContent = GeneralID.ToString(); taskmod.ExecuteTime = datetext; taskmod.Status = 0; if (taskmod.ID > 0) { taskBll.Update(taskmod); } else { taskBll.Add(taskmod); } } else if (taskmod != null) { taskBll.Delete(taskmod.ID); } }
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 mmd = bmode.GetModelById(Cdata.ModelID); NodeID = Cdata.NodeID; DataSet ds = new DataSet(); ds = bfield.GetProModelFieldS(Cdata.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]); RelatedIDS_Hid.Value = Cdata.RelatedIDS; SubTitle_L.Text = GetAlias("Subtitle", ds.Tables[0]); Button1.Text = "添加为新" + mmd.ItemName; EBtnSubmit.Text = "保存" + mmd.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) #region 节点权限 M_AdminInfo ad = badmin.GetAdminLogin(); #endregion 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-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>"; } 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 = bfield.GetUpdateAllHtml(ModelID, NodeID, 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; } hfNode.Value = SelectNode(Cdata.NodeID.ToString()); string breadTlp = "<li><a href='ContentManage.aspx'>内容管理</a></li><li><a href='ContentManage.aspx?NodeID=" + nnn.NodeID + "'>" + nnn.NodeName + "</a></li><li class='active'>修改内容"; 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(); } }