public void Page_Apply() { M_PageReg regMod = regBll.SelModelByUid(mu.UserID); if (regMod == null) { regMod = new M_PageReg(); regMod.ModelID = DataConvert.CLng(Request.Form["ApplyModel_Rad"]); } DataTable dt = fieldBll.GetModelFieldList(regMod.ModelID); Call commonCall = new Call(); DataTable table = commonCall.GetDTFromMVC(dt, Request); regMod.CompanyName = Request.Form["CompanyName"]; regMod.PageTitle = mu.UserName + "的黄页信息"; regMod.PageInfo = Request.Form["PageInfo"]; regMod.LOGO = Request.Form["LOGO_t"]; regMod.NodeStyle = DataConverter.CLng(Request.Form["TempleID_Hid"]);//样式与首页模板??,首页模板可动态以styleMod中为准 regMod.Template = Request.Form["TempleUrl_Hid"]; regMod.Status = SiteConfig.SiteOption.RegPageStart ? 0 : 99; if (regMod.ID > 0) { conBll.Page_Update(table, regMod); function.WriteSuccessMsg("修改提交成功", "PageInfo"); return; } else { M_ModelInfo applyMod = modBll.SelReturnModel(regMod.ModelID); regMod.TableName = applyMod.TableName; regMod.UserName = mu.UserName; regMod.UserID = mu.UserID; regMod.ID = conBll.Page_Add(table, regMod); function.WriteSuccessMsg("申请提交成功", "PageInfo"); return; } }
public IActionResult Apply_Update() { M_PageReg regMod = regBll.SelReturnModel(Mid); M_UserInfo mu = buser.SelReturnModel(regMod.UserID); DataTable dt = fieldBll.GetModelFieldList(regMod.ModelID); DataTable table = Call.GetDTFromMVC(dt, Request); regMod.CompanyName = Request.Form["CompanyName"]; regMod.PageTitle = mu.UserName + "的黄页信息"; regMod.PageInfo = Request.Form["PageInfo"]; regMod.LOGO = Request.Form["LOGO_t"]; regMod.NodeStyle = DataConverter.CLng(Request.Form["TempleID_Hid"]);//样式与首页模板??,首页模板可动态以styleMod中为准 regMod.Template = Request.Form["TempleUrl_Hid"]; //regMod.Status =//状态不变更 //regMod.ModelID = applyMod.ModelID; //regMod.TableName = applyMod.TableName; conBll.Page_Update(table, regMod); return(WriteOK("修改提交成功", "ApplyAudit")); }
//修改 protected void Button5_Click(object sender, EventArgs e) { int HdnID = DataConverter.CLng(this.HdnID.Value); this.ModelID = DataConverter.CLng(this.HdnModel.Value); DataTable dt = this.mll.GetModelFieldList(this.ModelID); M_ModelInfo dts = this.moll.GetModelById(this.ModelID); #region 扩展表 DataTable table = new DataTable(); table.Columns.Add(new DataColumn("FieldName", typeof(string))); table.Columns.Add(new DataColumn("FieldType", typeof(string))); table.Columns.Add(new DataColumn("FieldValue", typeof(string))); foreach (DataRow dr in dt.Rows) { if (DataConverter.CBool(dr["IsNotNull"].ToString())) { if (string.IsNullOrEmpty(this.Page.Request.Form["txt_" + dr["FieldName"].ToString()])) { function.WriteErrMsg(dr["FieldAlias"].ToString() + "不能为空!"); } } if (dr["FieldType"].ToString() == "FileType") { string[] Sett = dr["Content"].ToString().Split(new char[] { ',' }); bool chksize = DataConverter.CBool(Sett[0].Split(new char[] { '=' })[1]); string sizefield = Sett[1].Split(new char[] { '=' })[1]; if (chksize && sizefield != "") { DataRow row2 = table.NewRow(); row2[0] = sizefield; row2[1] = "FileSize"; row2[2] = this.Page.Request.Form["txt_" + sizefield]; table.Rows.Add(row2); } } if (dr["FieldType"].ToString() == "MultiPicType") { string[] Sett = dr["Content"].ToString().Split(new char[] { ',' }); bool chksize = DataConverter.CBool(Sett[0].Split(new char[] { '=' })[1]); string sizefield = Sett[1].Split(new char[] { '=' })[1]; if (chksize && sizefield != "") { if (string.IsNullOrEmpty(this.Page.Request.Form["txt_" + sizefield])) { function.WriteErrMsg(dr["FieldAlias"].ToString() + "的缩略图不能为空!"); } DataRow row1 = table.NewRow(); row1[0] = sizefield; row1[1] = "ThumbField"; row1[2] = this.Page.Request.Form["txt_" + sizefield]; table.Rows.Add(row1); } } DataRow row = table.NewRow(); row[0] = dr["FieldName"].ToString(); string ftype = dr["FieldType"].ToString(); row[1] = ftype; string fvalue = this.Page.Request.Form["txt_" + dr["FieldName"].ToString()]; if (ftype == "TextType" || ftype == "MultipleTextType" || ftype == "MultipleHtmlType") { fvalue = sell.ProcessSen(fvalue); } row[2] = fvalue; table.Rows.Add(row); } string uname = ull.GetLogin().UserName; this.UserInfo = ull.GetLogin(); #endregion M_PageReg regMod = b_PageReg.SelReturnModel(Mid); regMod.CompanyName = CompName_T.Text; regMod.LOGO = Logo_T.Text; regMod.PageInfo = PageInfo_T.Text; regMod.Template = TxtTemplate_hid.Value; regMod.NodeStyle = Convert.ToInt32(NodeStyle_Hid.Value); cll.Page_Update(table, regMod); function.WriteSuccessMsg("修改成功", "PageManage.aspx"); }
public void Page_Apply() { string tempurl = Request.Form["templateUrl"]; int InfoID = DataConverter.CLng(Request.Form["ID_Hid"]); int ModelID = DataConverter.CLng(Request.Form["ModelID_Hid"]); conBll.UpTemplata(InfoID, tempurl); DataTable dt = fieldBll.GetModelFieldList(ModelID); M_ModelInfo model = modBll.GetModelById(ModelID); string pagetemplate = ""; if (model.ModelID > 0) { pagetemplate = model.ContentModule; } else { pagetemplate = ""; } Call commonCall = new Call(); DataTable table; try { table = commonCall.GetDTFromMVC(dt, Request); } catch (Exception e) { function.WriteErrMsg(e.Message); return; } DataRow rs1 = table.NewRow(); rs1[0] = "UserID"; rs1[1] = "int"; rs1[2] = mu.UserID; DataRow rs2 = table.NewRow(); rs2[0] = "UserName"; rs2[1] = "TextType"; rs2[2] = mu.UserName; DataRow rs3 = table.NewRow(); //Styleid|黄页样式ID|数字|0 rs3[0] = "Styleid"; rs3[1] = "int"; int styleid = DataConverter.CLng(Request.Form["TempleID_Hid"]); rs3[2] = styleid == 0 ? 1 : styleid; //未选择,则默认第一个 table.Rows.Add(rs1); table.Rows.Add(rs2); table.Rows.Add(rs3); int styless = DataConverter.CLng(Request.Form["StyleID"]); string tablename = modBll.GetModelById(styless).TableName; M_PageReg crMod = prBll.GetSelectByUserID(mu.UserID); if (crMod == null) { crMod = new M_PageReg(); } crMod.CompanyName = Request.Form["CompanyName"]; crMod.UserName = mu.UserName; crMod.UserID = mu.UserID; crMod.PageTitle = mu.UserName + "的黄页信息"; crMod.PageInfo = Request.Form["PageInfo"]; crMod.LOGO = Request.Form["LOGO"]; crMod.NodeStyle = DataConverter.CLng(Request.Form["TempleID_Hid"]); crMod.Template = Request.Form["TempleUrl_Hid"]; if (SiteConfig.SiteOption.RegPageStart) { crMod.Status = 0; } else { crMod.Status = 99; } crMod.TableName = tablename; crMod.ModelID = styless; crMod.CreationTime = DateTime.Now; if (crMod.ID > 0) { conBll.Page_Update(table, crMod); function.WriteSuccessMsg("修改提交成功", "PageInfo"); return; } else { crMod.TopWords = ""; crMod.Style = 0; crMod.ParentPageUserID = 0; crMod.ParentPageID = 0; crMod.Keyword = ""; crMod.InfoID = 0; crMod.Hits = 0; crMod.NavHeight = "0"; crMod.NavColor = ""; crMod.Description = ""; crMod.BottonWords = ""; int newID = conBll.Page_Add(table, crMod); function.WriteSuccessMsg("申请提交成功", "PageInfo"); return; } }