//是否需要生成或重新生成html private void IsCreateHtml(M_CommonData CData, DataTable table) { string ischk = Request["quickmake"]; if (!string.IsNullOrEmpty(ischk)) { CreateHtmlDel createHtml = CreateHtmlFunc; createHtml.BeginInvoke(HttpContext.ApplicationInstance.Context.Request, CData, table, null, null); } }
//保存项目 protected void EBtnSubmit_Click(object sender, EventArgs e) { DataTable table = new DataTable(); M_CommonData model = contentBll.SelReturnModel(GeneralID); FillModel(ref table, model); //推送 if (!string.IsNullOrEmpty(pushcon_hid.Value)) { string[] nodeArr = pushcon_hid.Value.Trim(',').Split(','); for (int i = 0; i < nodeArr.Length; i++) { model.NodeID = Convert.ToInt32(nodeArr[i]); contentBll.AddContent(table, model); } } contentBll.UpdateContent(table, model); #region disuse //ZLLog.ToDB(ZLEnum.Log.content, new M_Log() // { // UName = adminMod.AdminName, // Source = Request.RawUrl, // Action = "修改内容", // Message = "标题:" + CData.Title + ",Gid:" + CData.GeneralID, // Level = "edit" // }); //if (!string.IsNullOrEmpty(Request.Form["HdnSpec"]))//专题 //{ // string SpecID = Request.Form["HdnSpec"];// HdnSpec.Value; // if (SpecID.EndsWith(",")) // { // SpecID = SpecID.Substring(0, SpecID.LastIndexOf(",")); // } //} #endregion CreateHtmlDel createHtml = CreateHtmlFunc; createHtml.BeginInvoke(HttpContext.Current.Request, createnew, model, table, null, null); //if (nodeMod.ListPageHtmlEx < 3 && quickmake.Checked == true) // iscreate = "1"; Response.Redirect("ContentShow.aspx?gid=" + GeneralID + "&type=edit"); }
protected void EBtnSubmit_Click(object sender, EventArgs e)//添加文章 { M_AdminInfo adminMod = B_Admin.GetLogin(); IList <string> content = new List <string>(); if (SiteConfig.SiteOption.FileRj == 1 && contentBll.SelHasTitle(txtTitle.Text.Trim())) { function.WriteErrMsg(Resources.L.该内容标题已存在 + "!", "javascript:history.go(-1);"); } DataTable dt = fieldBll.SelByModelID(ModelID, false); Call commonCall = new Call(); DataTable table = commonCall.GetDTFromPage(dt, Page, ViewState, content); M_CommonData CData = new M_CommonData(); CData.NodeID = NodeID; CData.ModelID = ModelID; CData.TableName = modelBll.GetModelById(ModelID).TableName; CData.Title = txtTitle.Text.Trim(); CData.Inputer = string.IsNullOrEmpty(txtInputer.Text) ? adminMod.AdminName : txtInputer.Text; CData.EliteLevel = ChkAudit.Checked ? 1 : 0; CData.InfoID = ""; CData.Hits = string.IsNullOrEmpty(txtNum.Text) ? 0 : DataConverter.CLng(txtNum.Text); CData.UpDateType = 2; CData.UpDateTime = DataConverter.CDate(txtdate.Text); CData.TagKey = Request.Form["tabinput"]; string status = ddlFlow.SelectedValue.Trim(); if (!string.IsNullOrEmpty(status)) { CData.Status = Convert.ToInt32(status); } // CData.Titlecolor = Titlecolor.Text; CData.Template = TxtTemplate_hid.Value; CData.CreateTime = DataConverter.CDate(txtAddTime.Text); CData.SpecialID = "," + string.Join(",", Spec_Hid.Value.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries)) + ","; string parentTree = ""; CData.FirstNodeID = nodeBll.SelFirstNodeID(NodeID, ref parentTree); CData.ParentTree = parentTree; CData.TitleStyle = ThreadStyle.Value; CData.TopImg = ThumImg_Hid.Value;//首页图片 CData.PdfLink = Makepdf.Checked ? "pdf_" + DateTime.Now.ToString("yyyyMMddHHmmssfffffff") + ".pdf" : ""; CData.Subtitle = Subtitle.Text; CData.PYtitle = PYtitle.Text; CData.RelatedIDS = RelatedIDS_Hid.Value; CData.IsComm = Convert.ToInt32(IsComm_Radio.SelectedValue); int newID = contentBll.AddContent(table, CData);//插入信息给两个表,主表和从表:CData-主表的模型,table-从表 //推送 if (!string.IsNullOrEmpty(pushcon_hid.Value)) { string[] nodeArr = pushcon_hid.Value.Trim(',').Split(','); for (int i = 0; i < nodeArr.Length; i++) { CData.NodeID = Convert.ToInt32(nodeArr[i]); contentBll.AddContent(table, CData); } } #region 生成PDF //if (Makepdf.Checked) //{ // M_CommonData m_CommonData = contentBll.SelReturnModel(newID); // string strSql = "select source from " + CData.TableName + " where id=" + m_CommonData.ItemID; // string source = ""; // SqlDataReader dr = SqlHelper.ExecuteReader(System.Data.CommandType.Text, strSql); // if (dr.Read()) // { // source = dr["source"].ToString(); // } // dr.Close(); //} #endregion #region 关键词 { keys = StrHelper.RemoveRepeat(CData.TagKey.Split(','), IgnoreKey_Hid.Value.Split(',')); if (!string.IsNullOrEmpty(keys)) { keyBll.AddKeyWord(keys, 1); } } #endregion ZLLog.ToDB(ZLEnum.Log.content, new M_Log() { UName = adminMod.AdminName, Source = Request.RawUrl, Action = "添加内容", Message = "标题:" + CData.Title + ",Gid:" + newID, Level = "add" }); //添加计划任务(审核时间),如果自动审核时间小于当前时间则忽略 //if (!string.IsNullOrEmpty(CheckDate_T.Text) && Convert.ToDateTime(CheckDate_T.Text) > DateTime.Now) //{ // AddSched(newID, CheckDate_T.Text, M_Content_ScheTask.TaskTypeEnum.AuditArt); // contentBll.UpdateStatus(newID, (int)ZLEnum.ConStatus.UnAudit); //} //if (!string.IsNullOrEmpty(TimeDate_T.Text)) //{ // AddSched(newID, TimeDate_T.Text, M_Content_ScheTask.TaskTypeEnum.UnAuditArt); //} //积分 if (SiteConfig.UserConfig.InfoRule > 0) { B_User buser = new B_User(); M_UserInfo muser = buser.GetUserByName(adminMod.AdminName); if (!muser.IsNull) { buser.ChangeVirtualMoney(muser.UserID, new M_UserExpHis() { UserID = muser.UserID, detail = "添加内容:" + txtTitle.Text + "增加积分", score = SiteConfig.UserConfig.InfoRule, ScoreType = (int)M_UserExpHis.SType.Point }); } } M_Node noinfo = nodeBll.GetNodeXML(NodeID); CreateHtmlDel createHtml = CreateHtmlFunc; createHtml.BeginInvoke(HttpContext.Current.Request, quickmake.Checked, CData, table, null, null); Response.Redirect("ContentShow.aspx?gid=" + newID + "&type=add"); }
protected void EBtnSubmit_Click(object sender, EventArgs e)//添加文章 { IList <string> content = new List <string>(); string adminname = HttpContext.Current.Request.Cookies["ManageState"]["LoginName"]; adminname = StringHelper.Base64StringDecode(adminname); if (SiteConfig.SiteOption.FileRj == 1 && contentBll.SelHasTitle(txtTitle.Text.Trim())) { function.WriteErrMsg("该内容标题已存在!", "javascript:history.go(-1);"); } DataTable dt = mfieldBll.GetModelFieldAllListT(ModelID).Tables[0]; Call commonCall = new Call(); DataTable table = commonCall.GetDTFromPage(dt, Page, ViewState, content); M_CommonData CData = new M_CommonData(); CData.NodeID = NodeID; CData.ModelID = ModelID; CData.TableName = modelBll.GetModelById(ModelID).TableName; CData.Title = txtTitle.Text.Trim(); CData.Inputer = string.IsNullOrEmpty(txtInputer.Text) ? adminname : txtInputer.Text; CData.EliteLevel = ChkAudit.Checked ? 1 : 0; CData.InfoID = ""; CData.Hits = string.IsNullOrEmpty(txtNum.Text) ? 0 : DataConverter.CLng(txtNum.Text); CData.UpDateType = 2; CData.UpDateTime = DataConverter.CDate(txtdate.Text); CData.TagKey = Request.Form["tabinput"]; string status = ddlFlow.SelectedValue.Trim(); if (!string.IsNullOrEmpty(status)) { CData.Status = Convert.ToInt32(status); } // CData.Titlecolor = Titlecolor.Text; CData.Template = TxtTemplate_hid.Value; CData.CreateTime = DataConverter.CDate(txtAddTime.Text); CData.ProWeek = DataConverter.CLng(proweek.Text); CData.SpecialID = "," + string.Join(",", Spec_Hid.Value.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries)) + ","; CData.Pronum = DataConverter.CLng(pronum.Text); CData.BidType = DataConverter.CLng(BidType.SelectedValue); CData.IsBid = (CData.BidType > 0) ? 1 : 0; CData.BidMoney = DataConverter.CDouble(bidmoney.Text); CData.DefaultSkins = 0; CData.FirstNodeID = GetFriestNode(NodeID); CData.TitleStyle = ThreadStyle.Value; CData.ParentTree = GetParentTree(NodeID); //父级别树 CData.TopImg = Request.Form["selectpic"]; //首页图片 CData.PdfLink = Makepdf.Checked ? "pdf_" + DateTime.Now.ToString("yyyyMMddHHmmssfffffff") + ".pdf" : ""; CData.Subtitle = Subtitle.Text; CData.PYtitle = PYtitle.Text; CData.RelatedIDS = RelatedIDS_Hid.Value; CData.IsComm = Convert.ToInt32(IsComm_Radio.SelectedValue); int newID = contentBll.AddContent(table, CData);//插入信息给两个表,主表和从表:CData-主表的模型,table-从表 //推送 if (!string.IsNullOrEmpty(pushcon_hid.Value)) { string[] nodeArr = pushcon_hid.Value.Trim(',').Split(','); for (int i = 0; i < nodeArr.Length; i++) { CData.NodeID = Convert.ToInt32(nodeArr[i]); contentBll.AddContent(table, CData); } } #region 生成PDF //if (Makepdf.Checked) //{ // M_CommonData m_CommonData = contentBll.SelReturnModel(newID); // string strSql = "select source from " + CData.TableName + " where id=" + m_CommonData.ItemID; // string source = ""; // SqlDataReader dr = SqlHelper.ExecuteReader(System.Data.CommandType.Text, strSql); // if (dr.Read()) // { // source = dr["source"].ToString(); // } // dr.Close(); //} #endregion #region 关键词 B_KeyWord kll = new B_KeyWord(); if (!string.IsNullOrEmpty(CData.TagKey)) { string[] arrKey = CData.TagKey.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries); for (int tt = 0; tt < arrKey.Length; tt++) { if (kll.IsExist(arrKey[tt])) { M_KeyWord kinfo = kll.GetKeyByName(arrKey[tt]); kinfo.QuoteTimes++; kinfo.LastUseTime = DateTime.Now; if (string.IsNullOrEmpty(kinfo.ArrGeneralID)) { kinfo.ArrGeneralID = newID.ToString() + ","; } else { kinfo.ArrGeneralID = kinfo.ArrGeneralID + newID.ToString() + ","; } kll.Update(kinfo); } else { M_KeyWord kinfo1 = new M_KeyWord(); kinfo1.KeyWordID = 0; kinfo1.KeywordText = arrKey[tt]; kinfo1.KeywordType = 1; kinfo1.LastUseTime = DateTime.Now; kinfo1.Hits = 0; kinfo1.Priority = 10; kinfo1.QuoteTimes = 1; kinfo1.ArrGeneralID = "," + newID.ToString() + ","; kll.Add(kinfo1); } } } #endregion ZLLog.ToDB(ZLEnum.Log.content, new M_Log() { UName = adminname, Source = Request.RawUrl, Action = "添加内容", Message = "标题:" + CData.Title + ",Gid:" + newID, Level = "add" }); //添加计划任务(审核时间),如果自动审核时间小于当前时间则忽略 if (!string.IsNullOrEmpty(CheckDate_T.Text) && Convert.ToDateTime(CheckDate_T.Text) > DateTime.Now) { AddSched(newID, CheckDate_T.Text, M_Content_ScheTask.TaskTypeEnum.AuditArt); contentBll.UpdateStatus(newID, (int)ZLEnum.ConStatus.UnAudit); } if (!string.IsNullOrEmpty(TimeDate_T.Text)) { AddSched(newID, TimeDate_T.Text, M_Content_ScheTask.TaskTypeEnum.UnAuditArt); } //积分 if (SiteConfig.UserConfig.InfoRule > 0) { B_User buser = new B_User(); M_UserInfo muser = buser.GetUserByName(adminname); if (!muser.IsNull) { buser.ChangeVirtualMoney(muser.UserID, new M_UserExpHis() { UserID = muser.UserID, detail = "添加内容:" + txtTitle.Text + "增加积分", score = SiteConfig.UserConfig.InfoRule, ScoreType = (int)M_UserExpHis.SType.Point }); } } M_Node noinfo = nodeBll.GetNodeXML(NodeID); CreateHtmlDel createHtml = CreateHtmlFunc; createHtml.BeginInvoke(HttpContext.Current.Request, quickmake.Checked, CData, table, null, null); Response.Redirect("ContentShow.aspx?gid=" + newID + "&nodename=" + Server.UrlEncode(nodename.Value) + "&type=add"); }
//保存项目 protected void EBtnSubmit_Click(object sender, EventArgs e) { string adminname = HttpContext.Current.Request.Cookies["ManageState"]["LoginName"]; adminname = StringHelper.Base64StringDecode(adminname); M_CommonData CData = contentBll.GetCommonData(GeneralID); NodeID = CData.NodeID; ModelID = CData.ModelID; CData.Title = txtTitle.Text; CData.NodeID = NodeID; int elite = ChkAudit.Checked ? 1 : 0; if (CData.EliteLevel == 0 && elite == 1)//推荐增加用户积分 { if (SiteConfig.UserConfig.InfoRule > 0) { M_UserInfo muser = buser.GetUserByName(adminname); if (!muser.IsNull) { buser.ChangeVirtualMoney(muser.UserID, new M_UserExpHis() { score = SiteConfig.UserConfig.InfoRule, detail = "修改内容:" + txtTitle.Text + "增加积分", ScoreType = (int)M_UserExpHis.SType.Point, Operator = muser.UserID, OperatorIP = Request.UserHostAddress }); } } } /*-----------可用智能判断模型与节点绑定-------------------*/ M_Node nodeinfo = bnode.GetNodeXML(NodeID); if (nodeinfo.ContentModel != "") { string ContentModel = "," + nodeinfo.ContentModel + ","; if (ContentModel.IndexOf("," + ModelID.ToString() + ",") == -1) { nodeinfo.ContentModel = nodeinfo.ContentModel + "," + ModelID.ToString(); bnode.UpdateNode(nodeinfo); } } else { nodeinfo.ContentModel = ModelID.ToString(); bnode.UpdateNode(nodeinfo); } /*---------------------------------------------*/ CData.EliteLevel = elite; CData.InfoID = ""; CData.Template = TxtTemplate_hid.Value; CData.Hits = DataConverter.CLng(txtNum.Text); CData.UpDateType = 2; CData.UpDateTime = DataConverter.CDate(txtdate.Text); CData.Hits = string.IsNullOrEmpty(txtNum.Text) ? 0 : DataConverter.CLng(txtNum.Text); if (!string.IsNullOrEmpty(txtAddTime.Text)) { CData.CreateTime = DataConverter.CDate(txtAddTime.Text); } if (!string.IsNullOrEmpty(txtInputer.Text)) { CData.Inputer = txtInputer.Text; } string OldKey = CData.TagKey; CData.TagKey = Request.Form["tabinput"]; CData.Status = Convert.ToInt32(string.IsNullOrEmpty(ddlFlow.SelectedValue) ? "-3" : ddlFlow.SelectedValue);//-3为草稿状态 CData.ProWeek = DataConverter.CLng(proweek.Text); CData.Pronum = DataConverter.CLng(pronum.Text); CData.BidType = DataConverter.CLng(BidType.SelectedValue); CData.BidMoney = DataConverter.CDouble(bidmoney.Text); CData.Subtitle = Subtitle.Text; CData.PYtitle = PYtitle.Text; CData.FirstNodeID = GetFriestNode(NodeID); CData.TitleStyle = ThreadStyle.Value; CData.ParentTree = GetParentTree(NodeID); CData.TopImg = Request.Form["selectpic"];//首页图片 CData.SpecialID = Spec_Hid.Value; CData.RelatedIDS = RelatedIDS_Hid.Value; CData.IsComm = Convert.ToInt32(IsComm_Radio.SelectedValue); DataTable dt = bfield.GetModelFieldAllList(ModelID).Tables[0]; Call commonCall = new Call(); DataTable table = commonCall.GetDTFromPage(dt, Page, ViewState, content); contentBll.UpdateContent(table, CData); //推送 if (!string.IsNullOrEmpty(pushcon_hid.Value)) { string[] nodeArr = pushcon_hid.Value.Trim(',').Split(','); for (int i = 0; i < nodeArr.Length; i++) { CData.NodeID = Convert.ToInt32(nodeArr[i]); contentBll.AddContent(table, CData); } } #region 关键词 B_KeyWord kll = new B_KeyWord(); //if (!string.IsNullOrEmpty(Keyword)) //{ // if (string.IsNullOrEmpty(OldKey)) // { // string[] arrKey = Keyword.Split(new char[] { '|' }, StringSplitOptions.RemoveEmptyEntries); // for (int tt = 0; tt < arrKey.Length; tt++) // { // if (kll.IsExist(arrKey[tt])) // { // M_KeyWord kinfo = kll.GetKeyByName(arrKey[tt]); // kinfo.QuoteTimes++; // kinfo.LastUseTime = DateTime.Now; // if (string.IsNullOrEmpty(kinfo.ArrGeneralID)) // kinfo.ArrGeneralID = CData.GeneralID.ToString() + ","; // else // kinfo.ArrGeneralID = kinfo.ArrGeneralID + CData.GeneralID.ToString() + ","; // kll.Update(kinfo); // } // else // { // M_KeyWord kinfo1 = new M_KeyWord(); // kinfo1.KeyWordID = 0; // kinfo1.KeywordText = arrKey[tt]; // kinfo1.KeywordType = 1; // kinfo1.LastUseTime = DateTime.Now; // kinfo1.Hits = 0; // kinfo1.Priority = 10; // kinfo1.QuoteTimes = 1; // kinfo1.ArrGeneralID = "," + CData.GeneralID.ToString() + ","; // kll.Add(kinfo1); // } // } // } // else // { // string[] arrKey1 = Keyword.Split(new char[] { '|' }, StringSplitOptions.RemoveEmptyEntries); // string[] arrOld = OldKey.Split(new char[] { '|' }, StringSplitOptions.RemoveEmptyEntries); // for (int it = 0; it < arrKey1.Length; it++) // { // if (!FindInArr(arrOld, arrKey1[it])) // { // if (kll.IsExist(arrKey1[it])) // { // M_KeyWord kinfo = kll.GetKeyByName(arrKey1[it]); // kinfo.QuoteTimes++; // kinfo.LastUseTime = DateTime.Now; // if (string.IsNullOrEmpty(kinfo.ArrGeneralID)) // kinfo.ArrGeneralID = CData.GeneralID.ToString() + ","; // else // kinfo.ArrGeneralID = kinfo.ArrGeneralID + CData.GeneralID.ToString() + ","; // kll.Update(kinfo); // } // else // { // M_KeyWord kinfo1 = new M_KeyWord(); // kinfo1.KeyWordID = 0; // kinfo1.KeywordText = arrKey1[it]; // kinfo1.KeywordType = 1; // kinfo1.LastUseTime = DateTime.Now; // kinfo1.Hits = 0; // kinfo1.Priority = 10; // kinfo1.QuoteTimes = 1; // kinfo1.ArrGeneralID = "," + CData.GeneralID.ToString() + ","; // kll.Add(kinfo1); // } // } // } // } //} #endregion ZLLog.ToDB(ZLEnum.Log.content, new M_Log() { UName = adminname, Source = Request.RawUrl, Action = "修改内容", Message = "标题:" + CData.Title + ",Gid:" + CData.GeneralID, Level = "edit" }); //修改计划任务(审核时间) if (!CheckDate_Hid.Value.Equals(CheckDate_T.Text)) { UpdateSched(GeneralID, M_Content_ScheTask.TaskTypeEnum.AuditArt, CheckDate_T.Text); } //修改计划任务(过期时间) if (!TimeDate_Hid.Value.Equals(TimeDate_T.Text)) { UpdateSched(GeneralID, M_Content_ScheTask.TaskTypeEnum.UnAuditArt, TimeDate_T.Text); } if (!string.IsNullOrEmpty(Request.Form["HdnSpec"])) //专题 { string SpecID = Request.Form["HdnSpec"]; // HdnSpec.Value; if (SpecID.EndsWith(",")) { SpecID = SpecID.Substring(0, SpecID.LastIndexOf(",")); } } //修改多节点 string nodeid = (Request.Form["hfNode"] ?? "").TrimEnd(','); if (!string.IsNullOrEmpty(nodeid)) { string[] narr = nodeid.Split(','); bmn.DelByIDS(nodeid); M_MultiNode mmu = new M_MultiNode(); for (int i = 0; i < narr.Length; i++) { if (!string.IsNullOrEmpty(narr[i])) { mmu.N_NodeID = DataConverter.CLng(narr[i]); mmu.N_ItemID = GeneralID; bmn.GetInsert(mmu); } } } string iscreate = "0"; M_Node nodeMod = bnode.GetNodeXML(NodeID); CreateHtmlDel createHtml = CreateHtmlFunc; createHtml.BeginInvoke(HttpContext.Current.Request, createnew, CData, table, null, null); if (nodeMod.ListPageHtmlEx < 3 && quickmake.Checked == true) { iscreate = "1"; } Response.Redirect("ContentShow.aspx?gid=" + GeneralID + "&iscreate=" + iscreate + "&nodename=" + Server.UrlEncode(nodename.Value) + "&type=edit"); }
protected void EBtnSubmit_Click(object sender, EventArgs e)//添加文章 { M_UserInfo mu = buser.GetLogin(); M_Node nodeMod = nodeBll.GetNodeXML(NodeID); IList <string> content = new List <string>(); if (SiteConfig.SiteOption.FileRj == 1 && contentBll.SelHasTitle(txtTitle.Text.Trim())) { function.WriteErrMsg("该内容标题已存在!", "javascript:history.go(-1);"); } DataTable dt = mfieldBll.GetModelFieldAllListT(ModelID).Tables[0]; Call commonCall = new Call(); DataTable table = commonCall.GetDTFromPage(dt, Page, ViewState, content); M_CommonData CData = new M_CommonData(); CData.NodeID = NodeID; CData.ModelID = ModelID; CData.TableName = modelBll.GetModelById(ModelID).TableName; CData.Title = txtTitle.Text.Trim(); CData.Inputer = mu.UserName; CData.EliteLevel = 0; CData.InfoID = ""; CData.UpDateType = 2; CData.TagKey = Request.Form["tabinput"]; CData.Status = nodeMod.SiteContentAudit; CData.DefaultSkins = 0; string parentTree = ""; CData.FirstNodeID = nodeBll.SelFirstNodeID(NodeID, ref parentTree); CData.ParentTree = parentTree; CData.TitleStyle = ThreadStyle.Value; CData.TopImg = Request.Form["selectpic"];//首页图片 CData.Subtitle = Subtitle.Text; CData.PYtitle = PYtitle.Text; CData.RelatedIDS = RelatedIDS_Hid.Value; int newID = contentBll.AddContent(table, CData);//插入信息给两个表,主表和从表:CData-主表的模型,table-从表 #region 关键词 B_KeyWord kll = new B_KeyWord(); if (!string.IsNullOrEmpty(CData.TagKey)) { string[] arrKey = CData.TagKey.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries); for (int tt = 0; tt < arrKey.Length; tt++) { if (kll.IsExist(arrKey[tt])) { M_KeyWord kinfo = kll.GetKeyByName(arrKey[tt]); kinfo.QuoteTimes++; kinfo.LastUseTime = DateTime.Now; if (string.IsNullOrEmpty(kinfo.ArrGeneralID)) { kinfo.ArrGeneralID = newID.ToString() + ","; } else { kinfo.ArrGeneralID = kinfo.ArrGeneralID + newID.ToString() + ","; } kll.Update(kinfo); } else { M_KeyWord kinfo1 = new M_KeyWord(); kinfo1.KeyWordID = 0; kinfo1.KeywordText = arrKey[tt]; kinfo1.KeywordType = 1; kinfo1.LastUseTime = DateTime.Now; kinfo1.Hits = 0; kinfo1.Priority = 10; kinfo1.QuoteTimes = 1; kinfo1.ArrGeneralID = "," + newID.ToString() + ","; kll.Add(kinfo1); } } } #endregion //积分 if (SiteConfig.UserConfig.InfoRule > 0) { buser.ChangeVirtualMoney(mu.UserID, new M_UserExpHis() { UserID = mu.UserID, detail = "添加内容:" + txtTitle.Text + "增加积分", score = SiteConfig.UserConfig.InfoRule, ScoreType = (int)M_UserExpHis.SType.Point }); } CreateHtmlDel createHtml = CreateHtmlFunc; createHtml.BeginInvoke(HttpContext.Current.Request, quickmake.Checked, CData, table, null, null); Response.Redirect("MyContent.aspx?NodeID=" + NodeID); }
//保存项目 protected void EBtnSubmit_Click(object sender, EventArgs e) { B_Admin.CheckIsLogged(); M_AdminInfo adminMod = badmin.GetAdminLogin(); M_CommonData CData = contentBll.GetCommonData(GeneralID); NodeID = CData.NodeID; ModelID = CData.ModelID; CData.Title = txtTitle.Text; CData.NodeID = NodeID; int elite = ChkAudit.Checked ? 1 : 0; if (CData.EliteLevel == 0 && elite == 1)//推荐增加用户积分 { if (SiteConfig.UserConfig.InfoRule > 0) { M_UserInfo muser = buser.GetUserByName(adminMod.AdminName); if (!muser.IsNull) { buser.ChangeVirtualMoney(muser.UserID, new M_UserExpHis() { score = SiteConfig.UserConfig.InfoRule, detail = "修改内容:" + txtTitle.Text + "增加积分", ScoreType = (int)M_UserExpHis.SType.Point, Operator = muser.UserID, OperatorIP = Request.UserHostAddress }); } } } /*-----------可用智能判断模型与节点绑定-------------------*/ M_Node nodeinfo = bnode.GetNodeXML(NodeID); if (nodeinfo.ContentModel != "") { string ContentModel = "," + nodeinfo.ContentModel + ","; if (ContentModel.IndexOf("," + ModelID.ToString() + ",") == -1) { nodeinfo.ContentModel = nodeinfo.ContentModel + "," + ModelID.ToString(); bnode.UpdateNode(nodeinfo); } } else { nodeinfo.ContentModel = ModelID.ToString(); bnode.UpdateNode(nodeinfo); } /*---------------------------------------------*/ CData.EliteLevel = elite; CData.InfoID = ""; CData.Template = TxtTemplate_hid.Value; CData.Hits = DataConverter.CLng(txtNum.Text); CData.UpDateType = 2; CData.UpDateTime = DataConverter.CDate(txtdate.Text); CData.Hits = string.IsNullOrEmpty(txtNum.Text) ? 0 : DataConverter.CLng(txtNum.Text); if (!string.IsNullOrEmpty(txtAddTime.Text)) { CData.CreateTime = DataConverter.CDate(txtAddTime.Text); } if (!string.IsNullOrEmpty(txtInputer.Text)) { CData.Inputer = txtInputer.Text; } string OldKey = CData.TagKey; CData.TagKey = Request.Form["tabinput"]; CData.Status = Convert.ToInt32(string.IsNullOrEmpty(ddlFlow.SelectedValue) ? "-3" : ddlFlow.SelectedValue);//-3为草稿状态 CData.ProWeek = DataConverter.CLng(proweek.Text); CData.Pronum = DataConverter.CLng(pronum.Text); CData.BidType = DataConverter.CLng(BidType.SelectedValue); CData.BidMoney = DataConverter.CDouble(bidmoney.Text); CData.Subtitle = Subtitle.Text; CData.PYtitle = PYtitle.Text; string tree = ""; CData.FirstNodeID = bnode.SelFirstNodeID(NodeID, ref tree); CData.TitleStyle = ThreadStyle.Value; CData.ParentTree = tree; CData.TopImg = Request.Form["selectpic"];//首页图片 CData.SpecialID = Spec_Hid.Value; CData.RelatedIDS = RelatedIDS_Hid.Value; CData.IsComm = Convert.ToInt32(IsComm_Radio.SelectedValue); DataTable dt = fieldBll.SelByModelID(ModelID); Call commonCall = new Call(); DataTable table = commonCall.GetDTFromPage(dt, Page, ViewState, content); contentBll.UpdateContent(table, CData); //推送 if (!string.IsNullOrEmpty(pushcon_hid.Value)) { string[] nodeArr = pushcon_hid.Value.Trim(',').Split(','); for (int i = 0; i < nodeArr.Length; i++) { CData.NodeID = Convert.ToInt32(nodeArr[i]); contentBll.AddContent(table, CData); } } #region 关键词 { keys = StrHelper.RemoveRepeat(CData.TagKey.Split(','), IgnoreKey_Hid.Value.Split(',')); if (!string.IsNullOrEmpty(keys)) { keyBll.AddKeyWord(keys, 1); } } #endregion ZLLog.ToDB(ZLEnum.Log.content, new M_Log() { UName = adminMod.AdminName, Source = Request.RawUrl, Action = "修改内容", Message = "标题:" + CData.Title + ",Gid:" + CData.GeneralID, Level = "edit" }); //修改计划任务(审核时间) if (!CheckDate_Hid.Value.Equals(CheckDate_T.Text)) { UpdateSched(GeneralID, M_Content_ScheTask.TaskTypeEnum.AuditArt, CheckDate_T.Text); } //修改计划任务(过期时间) if (!TimeDate_Hid.Value.Equals(TimeDate_T.Text)) { UpdateSched(GeneralID, M_Content_ScheTask.TaskTypeEnum.UnAuditArt, TimeDate_T.Text); } if (!string.IsNullOrEmpty(Request.Form["HdnSpec"])) //专题 { string SpecID = Request.Form["HdnSpec"]; // HdnSpec.Value; if (SpecID.EndsWith(",")) { SpecID = SpecID.Substring(0, SpecID.LastIndexOf(",")); } } CreateHtmlDel createHtml = CreateHtmlFunc; createHtml.BeginInvoke(HttpContext.Current.Request, createnew, CData, table, null, null); //if (nodeMod.ListPageHtmlEx < 3 && quickmake.Checked == true) // iscreate = "1"; Response.Redirect("ContentShow.aspx?gid=" + GeneralID + "&type=edit"); }