public IActionResult CommentFor() { if (ItemID < 1) { return(WriteErr("内容ID错误")); } PageSetting setting = cmtBll.SeachCommentByGid1(CPage, PSize, ItemID); if (Request.IsAjax()) { return(PartialView("CommentFor_List", setting)); } //获取节点配置 M_CommonData cdata = conBll.GetCommonData(ItemID); if (cdata == null) { return(WriteErr("内容不存在")); } M_Node nodeMod = nodeBll.GetNodeXML(cdata.NodeID); if (nodeMod == null) { return(WriteErr("节点不存在")); } ViewBag.nodeMod = nodeMod; ViewBag.mu = mu; return(View(setting)); }
protected string GetState(string gid) { M_CommonData CData = cbll.GetCommonData(DataConverter.CLng(gid)); if (this.modeinfo.Rows.Count > 0) { switch (CData.Status) { case 99: if (DataConverter.CLng(this.modeinfo.Rows[0]["EliteLevel"]) == 1) { return("推荐"); } else { return("<span class='rd_green'>已审核</span>"); } case 0: return("<span class='rd_red'>未通过</span>"); default: return("<span class='rd_red'>关闭</span>"); } } else { return(""); } }
public ActionResult ShowPubList() { M_CommonData mc = conBll.GetCommonData(DataConverter.CLng(Mid)); M_UserPromotions upsinfo = ups.GetSelect(mc.NodeID, mu.GroupID); if (upsinfo.pid != 0 && upsinfo.look != 1) { function.WriteErrMsg("您所在会员组无查看权限!"); return(Content("")); } DataTable FieldDt = this.mfBll.GetModelFieldList(mc.ModelID); DataRow DataDr = conBll.GetContentByItems(mc.TableName, mc.GeneralID).Rows[0]; DataTable newDt = new DataTable(); newDt.Columns.Add("Title"); newDt.Columns.Add("Content"); DataRow dr1 = newDt.NewRow(); dr1["Title"] = "ID"; dr1["Content"] = DataDr["GeneralID"]; newDt.Rows.Add(dr1); DataRow dr2 = newDt.NewRow(); dr2["Title"] = "标题"; dr2["Content"] = DataDr["Title"]; newDt.Rows.Add(dr2); foreach (DataRow dr in FieldDt.Rows) { DataRow row = newDt.NewRow(); row["Title"] = dr["FieldAlias"]; row["Content"] = DataDr[dr["FieldName"].ToString()]; newDt.Rows.Add(row); } return(View(newDt)); }
/// <summary> /// 添加内容到数据库 返回新内容ID /// </summary> /// <param name="ContentDT">存储内容字段及其值的数据表</param> /// <param name="CommonData">存储内容公共数据的表</param> /// <returns>新内容ID</returns> public int AddContent(DataTable ContentDT, M_CommonData CommonData) { string FieldList = ""; string FieldValue = ""; foreach (DataRow dr in ContentDT.Rows) { if (string.IsNullOrEmpty(FieldList)) { FieldList = dr["FieldName"].ToString(); } else { FieldList = FieldList + "," + dr["FieldName"].ToString(); } if (string.IsNullOrEmpty(FieldValue)) { FieldValue = this.GetFieldValue(dr); } else { FieldValue = FieldValue + "," + this.GetFieldValue(dr); } } return(dal.AddContent(FieldList, FieldValue, CommonData)); }
//修改表单 protected void SaveForm_Btn_Click(object sender, EventArgs e) { //后台验证,前台不验证 OAFormUI.vstate = ViewState; M_UserInfo mu = buser.GetLogin(); DataTable authDT = perBll.SelAuthByRoles(mu.UserRole); M_OA_Document oaMod = oaBll.SelReturnModel(appID); if (perBll.CheckAuth(authDT, "oa_pro_no")) { oaMod.No = OAFormUI.NO_ASCX; } oaMod.Title = OAFormUI.Title_ASCX; oaMod.SendDate = DataConvert.CDate(OAFormUI.SendDate_ASCX); DataTable table = OAFormUI.CreateTable(OAFormUI.GetFields(OAFormUI.ModelID).Split(',')); M_CommonData conMod = conBll.SelReturnModel(Convert.ToInt32(oaMod.Content)); conBll.UpdateContent(table, conMod); oaBll.UpdateByID(oaMod); //if (!string.IsNullOrEmpty(CurrentStep.CanEditField))//修改表单 //{ // M_ModelInfo modelMod = bmode.GetModelById(ModelID); // M_CommonData CData = conBll.SelReturnModel(Convert.ToInt32(oaMod.Content)); // DataTable dt = fieldBll.GetModelFieldListall(ModelID); // DataTable table = commCall.GetDTFromPage(dt, Page, ViewState, null, true, CurrentStep.CanEditField);//读取步骤中设定的可修改字段 // conBll.UpdateContent(table, CData); //} function.WriteSuccessMsg("修改成功"); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { C_CopyRight.CheckLogin(); CheckHasRule(); if (GeneralID > 0) { M_CommonData conMod = conBll.SelReturnModel(GeneralID); NodeID = conMod.NodeID; ModelID = conMod.ModelID; Title_T.Text = conMod.Title; DataTable conDT = DBCenter.Sel(conMod.TableName, "ID=" + conMod.ItemID); if (conDT.Rows.Count > 0 && conDT.Columns.Contains("content")) { content_t.Text = conDT.Rows[0]["content"].ToString(); } } else { NodeID = 1; ModelID = 2; } M_Node nodeMod = nodeBll.SelReturnModel(NodeID); M_ModelInfo model = modelBll.SelReturnModel(ModelID); 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>"; Call.SetBreadCrumb(Master, bread); } }
public string GetBaseLabel() { string str = ""; DataTable dt = bfield.GetModelFieldListAll(ModelID); M_CommonData mc = bc.GetCommonData(Gid); DataTable contentDT = bc.GetContentByItems(mc.TableName, mc.GeneralID); for (int i = 0; i < dt.Rows.Count; i++) { if (dt.Rows[i]["FieldAlias"].ToString().Equals("附属图片"))//对某些字段特殊处理 { string[] imgArr = contentDT.Rows[0][dt.Rows[i]["FieldName"].ToString()].ToString().Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries); string value = ""; string img = "<img src='{0}' />"; string path = SiteConfig.SiteOption.UploadDir; foreach (string s in imgArr) { value += string.Format(img, path + s); } str += "<tr><td>" + dt.Rows[i]["FieldAlias"].ToString() + "</td><td>" + value + "</td></tr>"; } else { str += "<tr><td>" + dt.Rows[i]["FieldAlias"].ToString() + "</td><td>" + contentDT.Rows[0][dt.Rows[i]["FieldName"].ToString()].ToString() + "</td></tr>"; } } return(str); }
//初始化 private void GetInit() { M_CommonData dtinfo = cbll.GetCommonData(sid); DataTable dt = cbll.GetContent(sid); this.Namelabel.Text = dtinfo.Title; this.Label1.Text = dtinfo.Inputer; string tablename = dtinfo.TableName; B_ModelField mfll = new B_ModelField(); SafeSC.CheckDataEx(tablename); DataTable tableinfo = mfll.SelectTableName("ZL_Model", "tablename = '" + tablename + "'"); B_Model mll = new B_Model(); if (tableinfo.Rows.Count > 0) { this.Label6.Text = mbll.GetModelById(DataConverter.CLng(dt.Rows[0]["StoreModelID"].ToString())).ModelName; } else { this.Label6.Text = "查询错误!请核实此模型是否存在"; } //string tophtml = "<tr><td width=\"20%\"></td><td width = \"80%\"></td>"; //string endhtml = "</tr>"; //this.ModelHtml.Text = tophtml + this.mfbll.GetUpdateHtmlUser(int.Parse(dt.Rows[0]["StoreModelID"].ToString()), 0, dt) + endhtml; //this.ModelHtml.Text = this.mfbll.GetUpdateHtmlUser(int.Parse(dt.Rows[0]["StoreModelID"].ToString()), 0, dt); }
//public bool UpdateByID(M_Shop_DeliveryMan model) //{ // return DBCenter.UpdateByID(model, model.ID); //} //---------------------------------- /// <summary> /// 填充dt,用于写入数据库附表 /// </summary> public DataTable FillDT(M_CommonData storeMod, DataTable table) { { DataRow dr = table.NewRow(); dr[0] = "UserID"; dr[1] = "int"; dr[2] = storeMod.SuccessfulUserID; table.Rows.Add(dr); } { DataRow dr = table.NewRow(); dr[0] = "UserName"; dr[1] = "TextType"; dr[2] = storeMod.Inputer; table.Rows.Add(dr); } { DataRow dr = table.NewRow(); dr[0] = "StoreModelID"; dr[1] = "int"; dr[2] = storeMod.ModelID; table.Rows.Add(dr); } { DataRow dr = table.NewRow(); dr[0] = "StoreName"; dr[1] = "TextType"; dr[2] = storeMod.Title; table.Rows.Add(dr); } return(table); }
protected void btnUnAudit_Click(object sender, EventArgs e) { if (!string.IsNullOrEmpty(Request.Form["idchk"])) { string[] chkArr = Request.Form["idchk"].Split(','); foreach (string chk in chkArr) { int gid = DataConverter.CLng(chk); M_CommonData conMod = bll.GetCommonData(gid); string fleex = "." + conMod.HtmlLink.Split('.')[1]; FileSystemObject.Delete(Server.MapPath(conMod.HtmlLink), FsoMethod.File); string HtmlLinkurl = conMod.HtmlLink.Replace(gid + fleex, ""); DirectoryInfo di = new DirectoryInfo(Server.MapPath(HtmlLinkurl)); FileInfo[] ff = di.GetFiles(gid + "_" + "*"); if (ff.Length != 0) { foreach (FileInfo fi in ff) { fi.Delete(); } } conMod.HtmlLink = ""; conMod.IsCreate = 0; bll.Update(conMod); } } Response.Redirect("ListHtmlContent.aspx"); }
protected void Page_Load(object sender, EventArgs e) { ZoomLa.Common.function.AccessRulo(); B_Admin badmin = new B_Admin(); if (!B_ARoleAuth.Check(ZLEnum.Auth.store, "StoreManage")) { function.WriteErrMsg("没有权限进行此项操作"); } ShowGrid(); M_CommonData mc = cbll.GetCommonData(DataConverter.CLng(Request.QueryString["Id"])); int i = mc.ModelID; DataTable UserData = cbll.GetContentByItems(mc.TableName, Convert.ToInt32(Request.QueryString["Id"])); if (UserData.Rows.Count > 0) { DetailsView1.DataSource = UserData.DefaultView; DetailsView1.DataBind(); } if (!IsPostBack) { ViewState["id"] = Request.QueryString["id"]; mc = cbll.GetCommonData(DataConverter.CLng(Request.QueryString["Id"])); M_Node nnn = bn.GetNodeXML(DataConverter.CLng(UserData.Rows[0]["NodeID"])); mc.Hits = mc.Hits + 1; cbll.Update(mc); GetInit(); } Call.SetBreadCrumb(Master, "<li><a href='" + CustomerPageAction.customPath2 + "Main.aspx'>工作台</a></li><li><a href='../Shop/ProductManage.aspx'>商城管理</a></li><li><a href='StoreManage.aspx'>店铺管理</a></li><li class='active'>查看店铺信息</li>"); }
public IActionResult StoreContent() { if (ItemID < 1) { return(WriteErr("[产生错误的可能原因:您访问的商品信息不存在!")); } M_Product pinfo = proBll.GetproductByid(ItemID); if (pinfo == null) { return(WriteErr("[产生错误的可能原因:您访问的商品信息不存在!]")); } if (pinfo.UserShopID < 1) { Response.Redirect("/Shop/" + ItemID + ""); } M_CommonData storeMod = conBll.Store_SelModel(pinfo.UserShopID); if (!StoreCheck(storeMod, ref err)) { return(WriteErr(err)); } M_Store_Style styleMod = styleBll.SelReturnModel(storeMod.DefaultSkins); if (styleMod == null || string.IsNullOrEmpty(styleMod.Template_Content)) { return(WriteErr("尚未定义模板路径")); } string tlppath = styleMod.Template_Content; string ContentHtml = SafeSC.ReadFileStr(SiteConfig.SiteOption.TemplateDir + "/" + tlppath); ContentHtml = bll.CreateHtml(ContentHtml, 0, ItemID, 0); return(HtmlToClient(ContentHtml)); }
public IActionResult StoreIndex() { //if (ItemID < 1) { return WriteErr("店铺ID错误,StoreIndex?id=店铺ID");return; } M_CommonData storeMod = conBll.Store_SelModel(ItemID); if (!StoreCheck(storeMod, ref err)) { return(WriteErr(err)); } string tlppath = ""; if (!string.IsNullOrEmpty(storeMod.Template)) { tlppath = storeMod.Template; } else { M_Store_Style styleMod = styleBll.SelReturnModel(storeMod.DefaultSkins); if (styleMod != null) { tlppath = styleMod.Template_Index; } } if (string.IsNullOrEmpty(tlppath)) { return(WriteErr("尚未定义模板路径")); } string ContentHtml = SafeSC.ReadFileStr(SiteConfig.SiteOption.TemplateDir + "/" + tlppath); ContentHtml = bll.CreateHtml(ContentHtml, 0, ItemID, 0); return(HtmlToClient(ContentHtml)); }
private void ShowHits(int id) { M_CommonData CData = this.bll.GetCommonData(id); M_Node ninfo = nll.GetNodeXML(CData.NodeID); int hits = CData.Hits; if (Session["Content" + id.ToString()] == null) { DateTime d1 = DataConverter.CDate(Session["Content" + id.ToString()]); TimeSpan d3 = DateTime.Now.Subtract(d1); hits = CData.Hits + 1; this.bll.UpHits(id); AddHits(id);//添加点击记录 Session["Content" + id.ToString()] = DateTime.Now; } else { DateTime d1 = DataConverter.CDate(Session["Content" + id.ToString()]); TimeSpan d3 = DateTime.Now.Subtract(d1); if (d3.TotalSeconds >= ninfo.ClickTimeout) { hits = CData.Hits + 1; this.bll.UpHits(id); AddHits(id);//添加点击记录 Session["Content" + id.ToString()] = DateTime.Now; } } base.Response.Write("document.write(" + hits + ");"); }
public ActionResult CommentFor() { if (ItemID < 1) { function.WriteErrMsg("内容ID错误"); return(null); } //获取节点配置 M_CommonData cdata = conBll.GetCommonData(ItemID); if (cdata == null) { function.WriteErrMsg("内容不存在"); return(null); } M_Node nodeMod = nodeBll.GetNodeXML(cdata.NodeID); if (nodeMod == null) { function.WriteErrMsg("节点不存在"); return(null); } PageSetting setting = cmtBll.SeachCommentByGid1(CPage, PSize, ItemID); ViewBag.nodeMod = nodeMod; ViewBag.mu = mu; return(View(setting)); }
public int ContentManage_Html(int id, string action) { B_Create createBll = new B_Create(); M_CommonData conMod = contentBll.SelReturnModel(id); switch (action) { case "create": { conMod.IsCreate = 1; contentBll.UpdateByID(conMod); createBll.CreateInfo(conMod.GeneralID, conMod.NodeID, conMod.ModelID); createBll.CreatePageIndex(); } break; case "del": { if (!string.IsNullOrEmpty(conMod.HtmlLink)) { conMod.HtmlLink = ""; SafeSC.DelFile(conMod.HtmlLink); } conMod.IsCreate = 0; createBll.CreatePageIndex(); contentBll.UpdateByID(conMod); } break; } return(M_APIResult.Success); }
public string Comment_Reply() { if (!ZoomlaSecurityCenter.VCodeCheck(Request.Form["VCode_hid"], Request.Form["VCode"])) { return("-1"); } M_CommonData cdata = conBll.GetCommonData(ItemID); M_Node mnode = nodeBll.GetNodeXML(cdata.NodeID); M_Comment comment = new M_Comment(); comment.GeneralID = ItemID; comment.UserID = mu.UserID; comment.Audited = true; comment.Pid = DataConverter.CLng(Request.Form["id"]); comment.Contents = Request.Form["content"]; if (mnode.CommentType.Equals("2") && mu.IsNull) { return("-2"); } else if (string.IsNullOrEmpty(comment.Contents)) { return("-3"); } else { AddComment(comment); return("1"); } }
public string ContentManage_Del(string ids) { if (string.IsNullOrEmpty(ids)) { return("未指定需要删除的内容"); } //用户只能删除自己有管理权限的节点下的内容 string[] nids = badmin.GetNodeAuthStr("modify").Split(','); bool isSuper = adminMod.IsSuperAdmin(); foreach (string item in ids.Split(',')) { int id = DataConvert.CLng(item); if (id < 1) { continue; } M_CommonData conMod = contentBll.GetCommonData(id); //超管或其角色有对应的操作权限 if (isSuper || nids.FirstOrDefault(p => p.Equals(conMod.NodeID.ToString())) != null) { if (!string.IsNullOrEmpty(conMod.HtmlLink)) { SafeSC.DelFile(conMod.HtmlLink); } conMod.Status = (int)ZLEnum.ConStatus.Recycle; conMod.IsCreate = 0; conMod.HtmlLink = ""; contentBll.UpdateByID(conMod); } } return(M_APIResult.Success.ToString()); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { BindWX_DP.DataSource = wxBll.Sel(); BindWX_DP.DataBind(); BindWX_DP.Items.Insert(0, "未绑定微信"); TlpView_Tlp.DataSource = styleBll.Sel(); TlpView_Tlp.DataBind(); if (Mid > 0) { M_CommonData storeMod = conBll.SelReturnModel(Mid); UserShopName_T.Text = storeMod.Title; DataTable condt = conBll.GetContent(Mid); ModelHtml.Text = mfbll.InputallHtml(storeMod.ModelID, 0, new ModelConfig() { ValueDT = condt }); TlpView_Tlp.SelectedID = storeMod.DefaultSkins.ToString(); UserName_T.Text = storeMod.Inputer; UserName_H.Value = storeMod.SuccessfulUserID.ToString(); BindWX_DP.SelectedValue = storeMod.SpecialID; } else { DataTable dt = modBll.SelByType("6"); if (dt.Rows.Count < 1) { function.WriteErrMsg("请先创建店铺申请模型"); } ModelHtml.Text = mfbll.InputallHtml(Convert.ToInt32(dt.Rows[0]["ModelID"]), 0, new ModelConfig()); } Call.SetBreadCrumb(Master, "<li><a href='" + customPath2 + "Main.aspx'>工作台</a></li><li><a href='../Shop/ProductManage.aspx'>商城管理</a></li><li><a href='StoreManage.aspx'>店铺管理</a></li><li class='active'>店铺信息</li>"); } }
public string GetTitle(string infoid) { int p = DataConverter.CLng(infoid); M_CommonData cinfo = this.bll.GetCommonData(p); return(cinfo.Title); }
//保存 protected void Save_Btn_Click(object sender, EventArgs e) { OAFormUI.vstate = ViewState; Call commonCall = new Call(); M_OA_Document oaMod = null; if (Mid > 0) { oaMod = oaBll.SelReturnModel(Mid); } oaMod = FillMod(oaMod); M_MisProcedure proceMod = proceBll.SelReturnModel(ProID); DataTable table = OAFormUI.CreateTable(OAFormUI.GetFields(OAFormUI.ModelID).Split(',')); if (Mid > 0)//修改 { M_CommonData conMod = conBll.SelReturnModel(Convert.ToInt32(oaMod.Content)); conBll.UpdateContent(table, conMod); oaBll.UpdateByID(oaMod); } else { oaMod.Content = commonCall.AddContentToNode(oaMod, NodeID, OAFormUI.ModelID, table).ToString(); oaMod.ID = oaBll.insert(oaMod); } oaCom.CreateStep(oaMod, proceMod, new OAStepParam() { IsFirst = true, ReferUser = ReferUser_Hid.Value, StepNum = 1 }); Response.Redirect("ViewDrafting.aspx?ID=" + oaMod.ID + "&FlowType=2"); }
public ActionResult OrderList() { M_CommonData storeMod = conBll.SelMyStore_Ex(ref err); if (!string.IsNullOrEmpty(err)) { function.WriteErrMsg(err); return(null); } Filter_Order filter = new Filter_Order(); filter.cpage = CPage; filter.psize = PSize; filter.storeType = storeMod.GeneralID.ToString(); OrderViewModel viewMod = new OrderViewModel(filter, Request); viewMod.usefor = "store"; if (function.isAjax()) { return(PartialView("OrderList_List", viewMod)); } else { return(View(viewMod)); } }
//修改模式使用,更改前台页面 protected void BindText(int gid) { mcon = bll.GetCommonData(gid); if (buser.GetLogin().UserName != mcon.Inputer && !purBll.Auth("OAEdit", buser.GetLogin().UserRole, mcon.NodeID)) { function.WriteErrMsg("非本人添加或无修改权限!!"); } Title_T.Text = mcon.Title; nodeDP.SelectedValue = mcon.NodeID.ToString(); CreateTime.Text = mcon.CreateTime.ToString("yyyy年MM月dd日 HH:mm:ss"); userNameT.Text = mcon.Inputer; userGroupL.Text = strBll.SelNameByUid(buser.GetLogin().UserID); DataRow dr = boa.SelByItemID(mcon.TableName, mcon.ItemID).Rows[0]; Secret.SelectedValue = dr["Secret"].ToString(); Urgency.SelectedValue = dr["Urgency"].ToString(); Importance.SelectedValue = dr["Importance"].ToString(); userGroupL.Text = dr["userGroupT"].ToString(); content.Text = dr["content"].ToString(); if (!string.IsNullOrEmpty(dr["attach"].ToString())) { string[] af = dr["attach"].ToString().Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries); string h = ""; for (int i = 0; i < af.Length; i++) { h += "<span class='disupFile'>"; h += GroupPic.GetShowExtension(GroupPic.GetExtName(af[i])); h += "<a href='" + af[i] + "' title='点击下载'>" + af[i].Split('/')[(af[i].Split('/').Length - 1)] + "<a href='javascript:;' title='删除' onclick='delHasFile(\"" + af[i] + "\",this);' ><img src='/App_Themes/AdminDefaultTheme/images/del.png'/></a></span>"; } hasFileTD.InnerHtml = h; } hasFileData.Value = dr["attach"].ToString();//便于删除管理 saveBtn.Text = "修改"; }
protected void Save_Btn_Click(object sender, EventArgs e) { M_UserInfo mu = buser.GetLogin(); M_CommonData storeMod = ExHelper.Store2_User(); M_WX_APPID appMod = new M_WX_APPID(); if (DataConvert.CLng(storeMod.SpecialID) > 0) { appMod = appBll.SelReturnModel(DataConvert.CLng(storeMod.SpecialID)); } appMod.Alias = storeMod.Title; appMod.APPID = AppID_T.Text.Trim(); if (QCode_UP.HasFile) { QCode_UP.SaveFile(); appMod.QRCode = QCode_UP.FileUrl.Replace("/UploadFiles/", "");; } appMod.WxNo = WXNo_T.Text.Trim(); appMod.Secret = Secret_T.Text.Trim(); appMod.OrginID = OrginID.Text.Trim(); appMod.Pay_AccountID = Pay_Account.Text.Trim(); appMod.Pay_Key = Pay_Key.Text.Trim(); if (appMod.ID > 0) { appBll.UpdateByID(appMod); } else { appMod.ID = appBll.Insert(appMod); storeMod.SpecialID = appMod.ID.ToString(); DBCenter.UpdateSQL("ZL_Store_Reg", "StoreStyleID=" + appMod.ID, "ID=" + storeMod.ItemID); } function.WriteSuccessMsg("操作成功"); }
//草稿 protected void DraftBtn_Click(object sender, EventArgs e) { //M_UserInfo mu = buser.GetLogin(); DataTable dt = mfieldBll.GetModelFieldList(ModelID); Call commonCall = new Call(); DataTable table = commonCall.GetDTFromPage(dt, Page, ViewState); M_CommonData CData = new M_CommonData(); CData.NodeID = NodeID; if (!string.IsNullOrEmpty(ModelID.ToString())) { CData.ModelID = ModelID; CData.TableName = modelBll.GetModelById(ModelID).TableName; } CData.Title = txtTitle.Text.Trim(); CData.Status = -3; //CData.Inputer = mu.UserName; CData.InfoID = ""; CData.PdfLink = ""; CData.TagKey = Request.Form["tabinput"]; CData.Subtitle = Subtitle.Text; CData.PYtitle = PYtitle.Text; CData.TitleStyle = Request.Form["ThreadStyle"]; string parentTree = ""; CData.FirstNodeID = nodeBll.SelFirstNodeID(NodeID, ref parentTree); CData.ParentTree = parentTree; int newID = contentBll.AddContent(table, CData); Response.Redirect("MyContent.aspx?NodeID=" + NodeID); }
public string ContentManage_Del(string ids) { if (string.IsNullOrEmpty(ids)) { return("未指定需要删除的内容"); } //用户只能删除自己有管理权限的节点下的内容 bool isSuper = adminMod.IsSuperAdmin(); foreach (string item in ids.Split(',')) { int id = DataConvert.CLng(item); if (id < 1) { continue; } M_CommonData conMod = contentBll.GetCommonData(id); if (!string.IsNullOrEmpty(conMod.HtmlLink)) { ZoomLa.BLL.SafeSC.DelFile(conMod.HtmlLink); } conMod.Status = (int)ZLEnum.ConStatus.Recycle; conMod.IsCreate = 0; conMod.HtmlLink = ""; contentBll.UpdateByID(conMod); } return(M_APIResult.Success.ToString()); }
public void Option() { if (!string.IsNullOrEmpty(Request["menu"])) { DataBind(); string uname = string.Empty; M_CommonData b_CommonData = cbll.GetCommonData(DataConverter.CLng(Request.QueryString["id"])); switch (Request["menu"]) { case "Audit": messInfo.Sender = "1"; messInfo.Title = "店铺审核通知_通过"; messInfo.PostDate = DataConverter.CDate(DateTime.Now.ToShortDateString()); messInfo.Content = "店铺审核通知_通过"; messInfo.Receipt = ""; uname = b_CommonData.Inputer; string[] namearrr = uname.Split(new char[] { ',' }); for (int i = 0; i < namearrr.Length; i++) { messInfo.Incept = namearrr[i]; B_Message.Add(messInfo); } b_CommonData.Status = 99; cbll.Update(b_CommonData); Response.Write("<script language=javascript>alert('通过审核!并已发送短消息通知');location.href='StoreManage.aspx';</script>"); break; default: break; } } }
protected void DataBind(string ID) { int generealID = Convert.ToInt32(ID); mcon = bcon.GetCommonData(generealID); minfo = buser.GetUserByName(mcon.Inputer); Title_T.Text = mcon.Title; LbCreatTime.Text = mcon.CreateTime.ToString("yyyy年MM月dd日 HH:mm:ss"); userNameL.Text = mcon.Inputer; //function.WriteErrMsg(mcon.TableName + ":" + mcon.ItemID + ":" + generealID); DataRow dr = boa.SelByItemID(mcon.TableName, mcon.ItemID).Rows[0]; SecretL.Text = dr["Secret"].ToString(); UrgencyL.Text = dr["Urgency"].ToString(); ImportanceL.Text = dr["Importance"].ToString(); userGroupL.Text = dr["userGroupT"].ToString(); ContentHtml.Text = dr["content"].ToString(); if (!string.IsNullOrEmpty(dr["attach"].ToString())) { string[] af = dr["attach"].ToString().Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries); string h = ""; for (int i = 0; i < af.Length; i++) { h += "<span class='disupFile'>"; h += GroupPic.GetShowExtension(GroupPic.GetExtName(af[i])); h += "<a href='" + af[i] + "' title='点击下载'>" + af[i].Split('/')[(af[i].Split('/').Length - 1)] + "</span>"; } publicAttachTD.InnerHtml = h; } }
public void CreateHtmlFunc(HttpRequest r, bool c, M_CommonData cdate, DataTable table) { M_Node noinfo = nodeBll.GetNodeXML(NodeID); if (noinfo.ListPageHtmlEx < 3 && quickmake.Checked == true) { B_Create CreateBll = new B_Create(r); if (c) { CreateBll.createann(cdate.GeneralID.ToString()); //发布内容页 CreateBll.CreateColumnByID(cdate.NodeID.ToString()); //发布栏目页 } CreateBll.CreatePageIndex(); //发布首页 } cdate = contentBll.SelReturnModel(cdate.GeneralID); string[] strArr = fieldBll.GetIsChain(ModelID, 1).Split(',');//需要替换的字段 for (int i = 0; i < strArr.Length; i++) { DataRow[] dr = table.Select("FieldName = '" + strArr[i] + "' "); if (dr != null && dr.Length > 0) { dr[0]["FieldValue"] = wordBll.RePlaceKeyWord(dr[0]["FieldValue"].ToString()); } } contentBll.UpdateContent(table, cdate); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { if (Mid > 0) { M_CommonData model = conBll.SelReturnModel(Mid); M_Content conMod = new M_Content(); conMod.id = model.GeneralID; conMod.title = model.Title; conMod.topimg = model.TopImg; DataTable table = SqlHelper.ExecuteTable("SELECT * FROM ZL_C_YJMX WHERE ID=" + model.ItemID); if (table.Rows.Count < 1) { function.WriteErrMsg("游记不存在"); } //if (!string.IsNullOrEmpty(DataConvert.CStr(table.Rows[0]["content"]))) //{ // conMod.comlist = JsonConvert.DeserializeObject<List<M_Component>>(table.Rows[0]["content"].ToString()); //} conMod.mp3 = DataConvert.CStr(table.Rows[0]["music"]); conMod.pic = DataConvert.CStr(table.Rows[0]["pic"]); contStr = table.Rows[0]["content"].ToString(); Save_Hid.Value = JsonConvert.SerializeObject(conMod); } } }