public ActionResult Index() { M_CommonData storeMod = conBll.SelMyStore(mu.UserName); if (storeMod == null) { return(RedirectToAction("StoreApply")); //申请店铺 } else if (storeMod.Status != 99) //等待审核 { return(RedirectToAction("StoreEdit")); } else { DataTable cmdinfo = conBll.GetContent(storeMod.GeneralID); if (cmdinfo.Rows.Count < 1) { function.WriteErrMsg("店铺信息不完整"); return(Content("")); } DataRow dr = cmdinfo.Rows[0]; DataTable sstDT = sstbll.GetStyleByModel(Convert.ToInt32(dr["StoreModelID"]), 1); M_StoreStyleTable sst = sstbll.GetStyleByID(Convert.ToInt32(dr["StoreStyleID"])); ViewBag.sstdp = MVCHelper.ToSelectList(sstDT, "StyleName", "ID", dr["StoreStyleID"].ToString()); ViewBag.dr = dr; ViewBag.sstimg = sst == null ? "" : function.GetImgUrl(sst.StylePic); ViewBag.modelhtml = fieldBll.InputallHtml(DataConvert.CLng(dr["StoreModelID"]), 0, new ModelConfig() { ValueDT = cmdinfo }); } return(View(storeMod)); }
public IActionResult Index() { M_CommonData storeMod = conBll.SelMyStore(mu.UserName); if (storeMod == null) { return(RedirectToAction("StoreApply")); //申请店铺 } else if (storeMod.Status != 99) //等待审核 { return(RedirectToAction("StoreEdit")); } else { DataTable cmdinfo = conBll.GetContent(storeMod.GeneralID); if (cmdinfo.Rows.Count < 1) { return(WriteErr("店铺信息不完整")); } DataRow dr = cmdinfo.Rows[0]; //DataTable sstDT = sstbll.GetStyleByModel(Convert.ToInt32(dr["StoreModelID"]), 1); //M_StoreStyleTable sst = sstbll.GetStyleByID(Convert.ToInt32(dr["StoreStyleID"])); //ViewBag.sstdp = MVCHelper.ToSelectList(sstDT, "StyleName", "ID", dr["StoreStyleID"].ToString()); ViewBag.dr = dr; //ViewBag.sstimg = sst == null ? "" : function.GetImgUrl(sst.StylePic); } DataTable styleDt = styleBll.Sel(); styleDt.Columns["ID"].ColumnName = "TemplateID"; styleDt.Columns["Template_Index"].ColumnName = "TemplateUrl"; styleDt.Columns["Thumbnail"].ColumnName = "TemplatePic"; styleDt.Columns["StyleName"].ColumnName = "rname"; ViewBag.styleDt = styleDt; return(View(storeMod)); }
//初始化 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 IActionResult EditContent() { VM_Content vm = new VM_Content(); vm.conMod = contentBll.SelReturnModel(Mid); vm.ValueDT = contentBll.GetContent(vm.conMod); vm.fieldDT = fieldBll.SelByModelID(vm.conMod.ModelID, true); vm.nodeMod = nodeBll.SelReturnModel(vm.conMod.NodeID); vm.modelMod = modelBll.SelReturnModel(vm.conMod.ModelID); //M_Content_ScheTask exaTask = scheBll.GetModel(vm.conMod.BidType); //if (exaTask != null) { vm.ExamineTime = exaTask.ExecuteTime; } //M_Content_ScheTask expTask = scheBll.GetModel(vm.conMod.IsBid); //if (expTask != null) { vm.ExpiredTime = expTask.ExecuteTime; } //--------------- return(View("AddContent", vm)); }
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>"); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { SqlParameter[] sp = new SqlParameter[] { new SqlParameter("uname", Request.QueryString["username"]) }; DataTable shopinfo = mfbll.SelectTableName("ZL_CommonModel", "tablename like 'ZL_Store_%' and Inputer=@uname", sp); if (shopinfo.Rows.Count < 1) { function.WriteErrMsg("店铺不存在"); } DataTable modeinfo = mfbll.SelectTableName("ZL_Model", "TableName=@TableName", new SqlParameter[] { new SqlParameter("TableName", shopinfo.Rows[0]["TableName"].ToString()) }); if (shopinfo.Rows.Count > 0) { if (modeinfo.Rows.Count > 0) { UserShopName_T.Text = shopinfo.Rows[0]["Title"].ToString(); this.ViewState["GeneralID"] = shopinfo.Rows[0]["GeneralID"].ToString(); DataTable cmdinfo = cbll.GetContent(Convert.ToInt32(shopinfo.Rows[0]["GeneralID"].ToString())); if (cmdinfo.Rows.Count > 0) { this.HiddenField1.Value = cmdinfo.Rows[0]["StoreModelID"].ToString(); ModelHtml.Text = mfbll.InputallHtml(int.Parse(cmdinfo.Rows[0]["StoreModelID"].ToString()), 0, new ModelConfig() { ValueDT = cmdinfo }); } } } } 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 ActionResult EditContent() { int Mid = Convert.ToInt32(Request.QueryString["GeneralID"]); int VerID = DataConvert.CLng(Request.QueryString["Ver"]); VM_Content vm = new VM_Content(); if (VerID > 0) { M_Content_VerBak verMod = verBll.SelReturnModel(VerID); vm.conMod = JsonConvert.DeserializeObject <M_CommonData>(verMod.ContentBak); if (vm.conMod.GeneralID != Mid) { function.WriteErrMsg("加载的版本与内容不匹配"); return(null); } vm.ValueDT = JsonConvert.DeserializeObject <DataTable>(verMod.TableBak); } else { vm.conMod = contentBll.SelReturnModel(Mid); vm.ValueDT = contentBll.GetContent(vm.conMod); } vm.fieldDT = fieldBll.SelByModelID(vm.conMod.ModelID, true); vm.nodeMod = nodeBll.SelReturnModel(vm.conMod.NodeID); if (!B_NodeRole.CheckNodeAuth(adminMod, vm.nodeMod.NodeID, "addto")) { function.WriteErrMsg("你无权修改该内容"); return(null); } vm.modelMod = modelBll.SelReturnModel(vm.conMod.ModelID); if (!string.IsNullOrEmpty(vm.conMod.SpecialID)) { vm.SpecialDT = spbll.SelByIDS(vm.conMod.SpecialID); if (vm.SpecialDT == null) { vm.SpecialDT = new DataTable(); } } DataTable ddlDT = proBll.SelByNodeID2(vm.NodeID); ViewBag.ddlDT = ddlDT; //M_Content_ScheTask exaTask = scheBll.GetModel(vm.conMod.BidType); //if (exaTask != null) { vm.ExamineTime = exaTask.ExecuteTime; } //M_Content_ScheTask expTask = scheBll.GetModel(vm.conMod.IsBid); //if (expTask != null) { vm.ExpiredTime = expTask.ExecuteTime; } //--------------- return(View("AddContent", vm)); }
public void ShowPage(M_MisProcedure proceMod) { if (Mid > 0) { M_OA_Document oaMod = oaBll.SelReturnModel(Mid); DataTable dtContent = conBll.GetContent(Convert.ToInt32(oaMod.Content)); if (dtContent == null || dtContent.Rows.Count < 1) { return; } OAFormUI.dataRow = dtContent.Rows[0]; OAFormUI.MyBind(); } }
public ActionResult AddContent() { M_CommonData Cdata = new M_CommonData(); if (Mid > 0) { Cdata = conBll.GetCommonData(Mid); NodeID = Cdata.NodeID; ModelID = Cdata.ModelID; } else { Cdata.ModelID = ModelID; Cdata.NodeID = NodeID; } if ((ModelID < 1 && NodeID < 1) && Mid < 1) { function.WriteErrMsg("参数错误"); return(Content("")); } M_ModelInfo model = modBll.GetModelById(ModelID); M_Templata nodeMod = tempBll.SelReturnModel(NodeID); if (Mid > 0) { if (mu.UserName != Cdata.Inputer) { function.WriteErrMsg("不能编辑不属于自己输入的内容!"); return(Content("")); } DataTable dtContent = conBll.GetContent(Mid); //ViewBag.modelhtml = fieldBll.InputallHtml(Cdata.ModelID, Cdata.NodeID, new ModelConfig() //{ // Source = ModelConfig.SType.UserContent, // ValueDT = dtContent //}); } else { //ViewBag.modelhtml = fieldBll.InputallHtml(ModelID, NodeID, new ModelConfig() //{ // Source = ModelConfig.SType.UserContent //}); } ViewBag.NodeName = nodeMod.TemplateName; ViewBag.ds = fieldBll.SelByModelID(ModelID, true); ViewBag.op = (Mid < 1 ? "添加" : "修改") + model.ItemName; ViewBag.tip = "向 <a href='MyContent?NodeId=" + nodeMod.TemplateID + "'>[" + nodeMod.TemplateName + "]</a> 节点" + ViewBag.op; return(View(Cdata)); }
public ActionResult AddContent1() { B_User.CheckIsLogged(HttpUtility.UrlEncode(Request.RawUrl)); M_CommonData Cdata = new M_CommonData(); NodeID = DataConvert.CLng(Request.QueryString["NodeID"]); ModelID = DataConvert.CLng(Request.QueryString["ModelID"]); if (Mid > 0) { Cdata = conBll.GetCommonData(Mid); NodeID = Cdata.NodeID; ModelID = Cdata.ModelID; } if ((ModelID < 1 && NodeID < 1) && Mid < 1) { function.WriteErrMsg("参数错误"); } M_ModelInfo model = modBll.GetModelById(ModelID); M_Node nodeMod = nodeBll.SelReturnModel(NodeID); if (Mid > 0) { if (mu.UserName != Cdata.Inputer) { function.WriteErrMsg("不能编辑不属于自己输入的内容!"); } DataTable dtContent = conBll.GetContent(Mid); ViewBag.modelhtml = fieldBll.InputallHtml(Cdata.ModelID, Cdata.NodeID, new ModelConfig() { Source = ModelConfig.SType.UserContent, ValueDT = dtContent }); } else { ViewBag.modelhtml = fieldBll.InputallHtml(ModelID, NodeID, new ModelConfig() { Source = ModelConfig.SType.UserContent }); } ViewBag.ds = fieldBll.SelByModelID(ModelID, true); ViewBag.op = (Mid < 1 ? "添加" : "修改") + model.ItemName; ViewBag.tip = "向 <a href='MyContent?NodeId=" + nodeMod.NodeID + "'>[" + nodeMod.NodeName + "]</a> 节点" + ViewBag.op; return(View(Cdata)); }
public void MyBind(M_OA_Document oaMod) { M_UserInfo mu = buser.GetLogin(); SendMan_L.Text = oaMod.UserName; stepNameL.Text = "已完结"; ascx = proceBll.SelReturnModel(oaMod.ProID).FlowTlp; OAFormUI.SendDate_ASCX = oaMod.SendDate.ToString(); createTimeL.Text = oaMod.SendDate.ToString("yyyy年MM月dd日 HH:mm"); ModelID = Convert.ToInt32(proceBll.SelReturnModel(oaMod.ProID).FormInfo); DataTable dtContent = conBll.GetContent(Convert.ToInt32(oaMod.Content)); OAFormUI.InitControl(ViewState, ModelID); OAFormUI.dataRow = dtContent.Rows[0]; OAFormUI.MyBind(); OAFormUI.Title_ASCX = oaMod.Title; OAFormUI.NO_ASCX = oaMod.No; OAFormUI.No_ASCX_T.Enabled = false; }
public void MyBind(M_CommonData Cdata) { M_UserInfo mu = buser.GetLogin(); if (mu.UserName != Cdata.Inputer) { function.WriteErrMsg("不能编辑不属于自己输入的内容!"); } txtTitle.Text = Cdata.Title; Keywords.Text = Cdata.TagKey; PYtitle.Text = Cdata.PYtitle; DataTable dtContent = contentBll.GetContent(this.GeneralID); ModelHtml.Text = mfieldBll.InputallHtml(Cdata.ModelID, Cdata.NodeID, new ModelConfig() { Source = ModelConfig.SType.UserContent, ValueDT = dtContent }); }
public void ShowPage(M_OA_Document oaMod) { M_MisProcedure proceMod = new B_MisProcedure().SelReturnModel(oaMod.ProID); ModelID = DataConvert.CLng(proceMod.FormInfo); M_ModelInfo modelMod = bmode.GetModelById(ModelID); DataTable dt = fieldBll.GetModelFieldListall(ModelID); StringBuilder builder = new StringBuilder(); DataTable dtContent = conBll.GetContent(Convert.ToInt32(oaMod.Content)); //showBll.config = new FieldConfig() { OpenDisabled = true, source = FieldConfig.SType.OAForm,EnableField=CurrentStep.CanEditField }; if (disall) { showBll.config.EnableField = ""; } Html_Lit.Text = showBll.GetUpdateAllHtml(ModelID, 100, dtContent); formop_tr.Visible = !string.IsNullOrEmpty(CurrentStep.CanEditField); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { if (AppID < 1) { function.WriteErrMsg("未指定需要打印的文档"); } M_OA_Document oaMod = oaBll.SelReturnModel(AppID); M_MisProcedure proceMod = proceBll.SelReturnModel(oaMod.ProID); ascx = proceMod.PrintTlp; OAFormUI.InitControl(ViewState, Convert.ToInt32(proceMod.FormInfo)); OAFormUI.Title_ASCX = oaMod.Title; OAFormUI.SendDate_ASCX = oaMod.SendDate.ToString("yyyy年MM月dd日"); OAFormUI.NO_ASCX = oaMod.No; DataTable dtContent = conBll.GetContent(Convert.ToInt32(oaMod.Content)); OAFormUI.dataRow = dtContent.Rows[0]; OAFormUI.MyBind(); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { DataTable dt = fieldBll.GetModelFieldListall(ModelID); if (Mid > 0) { M_OA_Document oaMod = oaBll.SelReturnModel(Mid); DataTable dtContent = conBll.GetContent(Convert.ToInt32(oaMod.Content)); Html_Lit.Text = fieldBll.InputallHtml(ModelID, 9999, new ModelConfig() { ValueDT = dtContent }); } else { Html_Lit.Text = showBll.ShowStyleField(dt, 9999); } } }
//用于内容与商品 public VM_FieldModel(int modelid, int nodeid, ModelConfig modcfg, int gid, DataRow valueDr = null) { this.config = modcfg; this.ModelID = modelid; this.NodeID = nodeid; //暂只用于内容管理处 this.fieldDT = fieldBll.SelByModelID(ModelID, false, false); if (gid > 0)//如果指定了gid { this.GeneralID = gid; DataTable valueDT = conBll.GetContent(gid); if (valueDT != null && valueDT.Rows.Count > 0) { valueDR = valueDT.Rows[0]; } } if (valueDr != null) { this.valueDR = valueDr; } }
public IActionResult AddContent() { M_CommonData Cdata = new M_CommonData(); if (Mid > 0) { Cdata = conBll.GetCommonData(Mid); NodeID = Cdata.NodeID; ModelID = Cdata.ModelID; } else { Cdata.ModelID = ModelID; Cdata.NodeID = NodeID; } if ((ModelID < 1 && NodeID < 1) && Mid < 1) { return(WriteErr("参数错误")); } M_ModelInfo model = modBll.SelReturnModel(ModelID); M_Templata nodeMod = tempBll.SelReturnModel(NodeID); if (Mid > 0) { if (mu.UserName != Cdata.Inputer) { return(WriteErr("不能编辑不属于自己输入的内容!")); } DataTable dtContent = conBll.GetContent(Mid); } ViewBag.nodeMod = nodeMod; ViewBag.ds = fieldBll.SelByModelID(ModelID, true); ViewBag.op = (Mid < 1 ? "添加" : "修改") + model.ItemName; ViewBag.tip = "向 <a href='MyContent?NodeId=" + nodeMod.TemplateID + "'>[" + nodeMod.TemplateName + "]</a> 节点" + ViewBag.op; return(View(Cdata)); }
protected void Page_Load(object sender, EventArgs e) { //需要加上验证权限,发起人,经办人,审核人可查看进程,只要任意一步骤有该权限 userID = buser.GetLogin().UserID; if (function.isAjax())//处理AJAX { #region AJAX string action = Request.Form["action"]; string value = Request.Form["value"]; string result = "0"; switch (action) { case "PostDate": int id = Convert.ToInt32(value.Split(':')[0]); DateTime date = Convert.ToDateTime(value.Split(':')[1]); progBll.UpdateDate(userID, id, date); result = "1"; break; } Response.Write(result); Response.Flush(); Response.End(); #endregion } DataTable dt = buser.SelByUserID(userID);//用于验证是否有主办或经办权限,已改为与角色绑定,可以不需要使用dt oaMod = oaBll.SelReturnModel(appID); if (oaMod.Status == (int)ZLEnum.ConStatus.Filed) { Response.Redirect("FlowView.aspx?action=filed&appid=" + appID); } if (!IsPostBack) { #region 权限检测 M_UserInfo sendmu = buser.GetSelect(oaMod.UserID); M_UserInfo mu = buser.GetLogin(); ascx = proceBll.SelReturnModel(oaMod.ProID).FlowTlp; //回退权限 if (CurrentStep.HToption > 0) { if (oaMod.CurStepNum == 0)//如果为起始步,则不管是否有权限都不显示 { } else { rollBackSpan.Visible = true; rollBackBtn.Visible = true; if (CurrentStep.HToption == 1) { rollBackDP.Items.Insert(0, new ListItem("回退至上一步", "-1")); } else if (CurrentStep.HToption == 2) { FreeDPDataBind(); rollBackDP.Items.Insert(0, new ListItem("回退至上一步", "-1")); } } } //转交权限 if (CurrentStep.Qzzjoption > 0) { if (stepBll.IsLastStep(CurrentStep))//如果是最后一步,则也不显示 { } else { zjSpan.Visible = true; ZJDataBind(); zjDP.Items.Insert(0, new ListItem("下一步", "-1")); } } #region 签章 DataTable signDT = signBll.SelByUserID(buser.GetLogin().UserID); if (oaMod.IsComplete) { signTr.Visible = false; } else if (signDT != null && signDT.Rows.Count > 0) { SignRadioBind(signDT); } else { signTrRemind.Visible = true; } SignImgBind(); #endregion //-------------------经办,审阅等权限 #region 是否是经办,抄送或发起人 if (CurrentStep.Auth(M_MisProLevel.AuthEnum.Refer, dt)) { //拥有经办权限 agreeBtn.Visible = true; rejectBtn.Visible = true; //检测用户有无修改编号或表单的权限,如果有的话,则显示修改表单栏 SaveForm_Btn.Visible = true; //formop_tr.Visible = true; } else if (CurrentStep.Auth(M_MisProLevel.AuthEnum.CCUser, dt)) { //拥有抄送权限 DisAllAuth(); signTr.Visible = true; ccOPBar.Visible = true; if (progBll.CheckApproval(buser.GetLogin().UserID, CurrentStep.stepNum, oaMod.ID)) { signTr.Visible = false; ccUser_Btn.Visible = false; ccUser_Lab.Visible = true; } } else if (oaMod.UserID == userID)//发起人查看文件 { DisAllAuth(); } else { function.WriteErrMsg("你当前无权限批复该公文!!"); } #endregion //附件删除权限,拥有权限和附件的时候才显示 if (CurrentStep.PublicAttachOption > 0 && !string.IsNullOrEmpty(oaMod.PublicAttach)) { //delAttachBtn.Visible = true; } //显示附件 if (!string.IsNullOrEmpty(oaMod.PublicAttach)) { function.Script(this, "ZL_Webup.AddReadOnlyLi('" + oaMod.PublicAttach + "');"); } //会签 if (CurrentStep.HQoption > 0) { string ids = progBll.SelHQUserID(appID, CurrentStep.stepNum); hqTr.Visible = true; hqL.Text = buser.GetUserNameByIDS(ids); //如果用户已会签,则不显示拒绝与同意 if (ids.Split(',').Select(p => p).Contains(buser.GetLogin().UserID.ToString())) { opBar.Visible = false; } //显示未会签人 string[] allUser = CurrentStep.ReferUser.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries); string ids2 = StrHelper.RemoveRepeat(allUser, ids.Split(','));//未会签用户 if (string.IsNullOrEmpty(ids2.Replace(",", ""))) { unHql.Text = "(办理完成!!!)"; } else { unHql.Text = "(尚未办理:" + buser.GetUserNameByIDS(ids2) + ")"; } } if (oaMod.Status == -1 || oaMod.Status == 99 || oaMod.Status == 98) { //如果当前流程已完成,或已被拒绝 //opBar.Visible = false; //delAttachBtn.Visible = false; } //该栏与上一栏只能显示一个 if (oaMod.Status == 98 && freeBll.IsLastFreeStep(CurrentStep))//是自由流程,已同意,并且是最后一步时,显示该栏 { if (oaMod.ProType == (int)M_MisProcedure.ProTypes.Free) { Free_OP_Tr.Visible = HasNextAuth(CurrentStep, oaMod, mu); } else if (oaMod.ProType == (int)M_MisProcedure.ProTypes.AdminFree) { AdminFree_OP_Tr.Visible = HasNextAuth(CurrentStep, oaMod, mu); } } #region 数据绑定 //ProceName_L.Text = oaMod.Title; ////titleL.Text = oaMod.Title; if (!string.IsNullOrEmpty(oaMod.PrivateAttach)) { function.Script(this, "ShowWord();"); } SendMan_L.Text = sendmu.HoneyName; stepNameL.Text = CurrentStep.stepName; OAFormUI.SendDate_ASCX = oaMod.SendDate.ToString(); createTimeL.Text = oaMod.SendDate.ToString("yyyy年MM月dd日 HH:mm"); //txt_Content.Text = oaCom.ReplaceHolder(oaMod); ModelID = Convert.ToInt32(proceBll.SelReturnModel(oaMod.ProID).FormInfo); DataTable dtContent = conBll.GetContent(Convert.ToInt32(oaMod.Content)); OAFormUI.InitControl(ViewState, ModelID); if (dtContent != null && dtContent.Rows.Count > 0) { OAFormUI.dataRow = dtContent.Rows[0]; OAFormUI.MyBind(); } OAFormUI.Title_ASCX = oaMod.Title; OAFormUI.NO_ASCX = oaMod.No; DataTable authDT = perBll.SelAuthByRoles(mu.UserRole); OAFormUI.No_ASCX_T.Enabled = perBll.CheckAuth(authDT, "oa_pro_no"); DataBind(); #endregion #endregion } }
//初始化 private void GetInit() { DataTable shopinfo = mfbll.SelectTableName("ZL_CommonModel", "where tablename like 'ZL_Store_%' and Inputer='" + ubll.GetLogin().UserName + "'"); if (shopinfo.Rows.Count < 1) { Response.Redirect("StoreApply.aspx");//申请店铺 } else { ViewState["gid"] = shopinfo.Rows[0]["GeneralID"].ToString(); this.Label2.Text = "<a href=\"/Store/StoreIndex.aspx?id=" + shopinfo.Rows[0]["GeneralID"].ToString() + "\" target=\"_blank\">浏览店铺</a>"; if (shopinfo.Rows[0]["Status"].ToString() != "99") { Response.Redirect("StoreEdit.aspx"); } else { int id = Convert.ToInt32(shopinfo.Rows[0]["ItemID"].ToString()); string TableName = shopinfo.Rows[0]["TableName"].ToString(); DataTable st = Sql.Sel(TableName, "ID=" + id, ""); if (st.Rows.Count != 0) { this.Nametxt.Text = st.Rows[0]["StoreName"].ToString(); } else { this.Nametxt.Text = ""; } DataTable modeinfo = mfbll.SelectTableName("ZL_Model", "where TableName='" + TableName + "'"); if (modeinfo.Rows.Count > 0) { DataTable cmdinfo = cbll.GetContent(gid); if (cmdinfo.Rows.Count > 0) { this.Label3.Text = cmdinfo.Rows[0]["StoreCredit"].ToString(); this.Label4.Text = GetState(cmdinfo.Rows[0]["StoreCommendState"].ToString()); M_ModelInfo mi = bmll.GetModelById(int.Parse(cmdinfo.Rows[0]["StoreModelID"].ToString())); this.Label1.Text = mi.ModelName; //DataTable slist = sstbll.GetStyleByModel(int.Parse(cmdinfo.Rows[0]["StoreModelID"].ToString()), 1); DataTable slist = sstbll.GetStyleByModel(int.Parse(cmdinfo.Rows[0]["StoreModelID"].ToString()), 1); this.HiddenField1.Value = cmdinfo.Rows[0]["StoreModelID"].ToString(); this.SSTDownList.DataSource = slist; this.SSTDownList.DataTextField = "StyleName"; this.SSTDownList.DataValueField = "ID"; this.SSTDownList.DataBind(); this.SSTDownList.SelectedValue = cmdinfo.Rows[0]["StoreStyleID"].ToString(); M_StoreStyleTable sst = sstbll.GetStyleByID(int.Parse(cmdinfo.Rows[0]["StoreStyleID"].ToString())); this.Image1.ImageUrl = "~/UploadFiles/" + sst.StylePic; if (cmdinfo.Rows.Count > 0) { this.ModelHtml.Text = this.mfbll.GetUpdateHtmlUser(int.Parse(cmdinfo.Rows[0]["StoreModelID"].ToString()), 0, cmdinfo); } else { this.ModelHtml.Text = this.mfbll.GetInputHtmlUser(int.Parse(cmdinfo.Rows[0]["StoreModelID"].ToString()), 0); } //function.WriteErrMsg(ModelHtml.Text.ToString().Replace("<","左")); } } else { cbll.DelContent(gid); Response.Redirect("Default.aspx"); this.Label3.Text = "不可用"; this.Label4.Text = "不可用"; this.Label1.Text = "不可用"; this.SSTDownList.Items.Add(new ListItem("无", "")); this.Image1.Visible = false; } } } }
//初始化 private void GetInit() { M_UserInfo mu = buser.GetLogin(); M_CommonData storeMod = conBll.SelMyStore(mu.UserName); if (storeMod == null) { Response.Redirect("StoreApply.aspx");//申请店铺 } if (storeMod != null) { StoreUrl_L.Text = "<a href='/Store/StoreIndex.aspx?id=" + storeMod.GeneralID + "' target='_blank'> [浏览店铺]</a>"; } gid = storeMod.GeneralID; if (storeMod.Status != 99) { Response.Redirect("StoreEdit.aspx"); } else { DataTable st = Sql.Sel(storeMod.TableName, "ID=" + storeMod.ItemID, ""); if (st.Rows.Count != 0) { Nametxt.Text = st.Rows[0]["StoreName"].ToString(); } else { Nametxt.Text = ""; } DataTable modeinfo = mfbll.SelectTableName("ZL_Model", "TableName='" + storeMod.TableName + "'"); if (modeinfo.Rows.Count > 0) { DataTable cmdinfo = conBll.GetContent(gid); if (cmdinfo.Rows.Count > 0) { Label3.Text = cmdinfo.Rows[0]["StoreCredit"].ToString(); Label4.Text = GetState(cmdinfo.Rows[0]["StoreCommendState"].ToString()); M_ModelInfo mi = bmll.GetModelById(int.Parse(cmdinfo.Rows[0]["StoreModelID"].ToString())); Label1.Text = mi.ModelName; DataTable slist = sstbll.GetStyleByModel(int.Parse(cmdinfo.Rows[0]["StoreModelID"].ToString()), 1); HiddenField1.Value = cmdinfo.Rows[0]["StoreModelID"].ToString(); SSTDownList.DataSource = slist; SSTDownList.DataTextField = "StyleName"; SSTDownList.DataValueField = "ID"; SSTDownList.DataBind(); SSTDownList.SelectedValue = cmdinfo.Rows[0]["StoreStyleID"].ToString(); M_StoreStyleTable sst = sstbll.GetStyleByID(int.Parse(cmdinfo.Rows[0]["StoreStyleID"].ToString())); Image1.ImageUrl = function.GetImgUrl(sst.StylePic); if (cmdinfo.Rows.Count > 0) { ModelHtml.Text = mfbll.InputallHtml(DataConvert.CLng(cmdinfo.Rows[0]["StoreModelID"]), 0, new ModelConfig() { ValueDT = cmdinfo }); } else { ModelHtml.Text = mfbll.InputallHtml(DataConvert.CLng(cmdinfo.Rows[0]["StoreModelID"]), 0, new ModelConfig() { Source = ModelConfig.SType.UserBase }); } } } else { conBll.DelContent(gid); Response.Redirect("Default.aspx"); Label3.Text = "不可用"; Label4.Text = "不可用"; Label1.Text = "不可用"; SSTDownList.Items.Add(new ListItem("无", "")); Image1.Visible = false; } } }
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(); } }
public void StoreContent() { if (ItemID < 1) { ErrToClient("[产生错误的可能原因:您访问的商品信息不存在!"); } M_Product ItemInfo = proBll.GetproductByid(ItemID); if (ItemInfo == null) { ErrToClient("[产生错误的可能原因:您访问的商品信息不存在!]"); return; } M_Node nodeinfo = nodeBll.GetNodeXML(ItemInfo.Nodeid); if (nodeinfo.PurviewType) { if (!buser.CheckLogin()) { function.WriteErrMsg("该信息所属栏目需登录验证,请先登录再进行此操作!", "/User/login"); return; } else { //此处以后可以加上用户组权限检测 } } string TemplateDir = ""; //ItemID 商品ID if (proBll.SelectProByCmdID(ItemID).Rows.Count < 1) { function.WriteErrMsg("该商品不存在!"); return; } int UserID = DataConverter.CLng(proBll.SelectProByCmdID(ItemID).Rows[0]["UserID"]); string username = buser.GetUserByUserID(UserID).UserName; DataTable mosinfo = mfbll.SelectTableName("ZL_CommonModel", "TableName like 'ZL_Store_%' and Inputer='" + username + "'"); int GeneralID = DataConverter.CLng(mosinfo.Rows[0]["GeneralID"]); DataTable infos = conBll.GetContent(GeneralID); int StoreStyleID = DataConverter.CLng(infos.Rows[0]["StoreStyleID"]); M_StoreStyleTable stinfo = sstbll.GetStyleByID(DataConverter.CLng(StoreStyleID)); string ContentStyle = stinfo.ContentStyle; M_ModelInfo modelinfo = modBll.GetModelById(ItemInfo.ModelID); string TempNode = nodeBll.GetModelTemplate(ItemInfo.Nodeid, ItemInfo.ModelID); if (!string.IsNullOrEmpty(TempNode)) { TemplateDir = TempNode; } if (!string.IsNullOrEmpty(ContentStyle)) { TemplateDir = ContentStyle; } if (string.IsNullOrEmpty(TemplateDir)) { Response.Write("[产生错误的可能原因:该商品所属模型未指定模板!]"); } else { TemplateDir = base.Request.PhysicalApplicationPath + SiteConfig.SiteOption.TemplateDir + "/" + TemplateDir; TemplateDir = TemplateDir.Replace("/", @"\"); string ContentHtml = FileSystemObject.ReadFile(TemplateDir); ContentHtml = this.createBll.CreateHtml(ContentHtml, 0, ItemID, "0"); if (!string.IsNullOrEmpty(ContentHtml)) { /* --------------------判断是否分页 并做处理------------------------------------------------*/ string infoContent = ""; //进行处理的商品字段 string pagelabel = ""; string infotmp = ""; string pattern = @"{\#Content}([\s\S])*?{\/\#Content}"; //查找要分页的商品 if (Regex.IsMatch(ContentHtml, pattern, RegexOptions.IgnoreCase)) { infoContent = Regex.Match(ContentHtml, pattern, RegexOptions.IgnoreCase).Value; infotmp = infoContent; infoContent = infoContent.Replace("{#Content}", "").Replace("{/#Content}", ""); } //查找分页标签 bool isPage = false; string pattern1 = @"{ZL\.Page([\s\S])*?\/}"; if (Regex.IsMatch(ContentHtml, pattern1, RegexOptions.IgnoreCase)) { pagelabel = Regex.Match(ContentHtml, pattern1, RegexOptions.IgnoreCase).Value; isPage = true; } if (isPage) { if (string.IsNullOrEmpty(infoContent)) //没有设定要分页的字段商品 { ContentHtml = ContentHtml.Replace(pagelabel, ""); } else //进行商品分页处理 { //文件名 string file1 = "StoreContent.aspx?ItemID=" + ItemID.ToString(); //取分页标签处理结果 返回字符串数组 根据数组元素个数生成几页 string ilbl = pagelabel.Replace("{ZL.Page ", "").Replace("/}", "").Replace(" ", ","); string lblContent = ""; int NumPerPage = 500; IList <string> ContentArr = new List <string>(); if (string.IsNullOrEmpty(ilbl)) { lblContent = "{loop}<a href=\"{$pageurl/}\">{$pageid/}</a>$$$<b>[{$pageid/}]</b>{/loop}"; //默认格式的分页导航 ContentArr = this.createBll.GetContentPage(infoContent, NumPerPage); } else { string[] paArr = ilbl.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries); if (paArr.Length == 0) { lblContent = "{loop}<a href=\"{$pageurl/}\">{$pageid/}</a>$$$<b>[{$pageid/}]</b>{/loop}"; //默认格式的分页导航 ContentArr = this.createBll.GetContentPage(infoContent, NumPerPage); } else { string lblname = paArr[0].Split(new char[] { '=' })[1].Replace("\"", ""); if (paArr.Length > 1) { NumPerPage = DataConverter.CLng(paArr[1].Split(new char[] { '=' })[1].Replace("\"", "")); } B_Label blbl = new B_Label(); lblContent = blbl.GetLabelXML(lblname).Content; if (string.IsNullOrEmpty(lblContent)) { lblContent = "{loop}<a href=\"{$pageurl/}\">{$pageid/}</a>$$$<b>[{$pageid/}]</b>{/loop}"; //默认格式的分页导航 } ContentArr = this.createBll.GetContentPage(infoContent, NumPerPage); } } //Response.Write(NumPerPage.ToString()); //Response.End(); if (ContentArr.Count > 0) //存在分页数据 { ContentHtml = ContentHtml.Replace(infotmp, ContentArr[Cpage - 1]); ContentHtml = ContentHtml.Replace(pagelabel, this.createBll.GetPage(lblContent, ItemID, Cpage, ContentArr.Count, NumPerPage)); } else { ContentHtml = ContentHtml.Replace(infotmp, infoContent); ContentHtml = ContentHtml.Replace(pagelabel, ""); } } } else //没有分页标签 { //如果设定了分页商品字段 将该字段商品的分页标志清除 if (!string.IsNullOrEmpty(infoContent)) { ContentHtml = ContentHtml.Replace(infotmp, infoContent); } } } /*--------------------- 分页商品处理结束-------------------------------------------------------------------------*/ Response.Write(ContentHtml); } }