예제 #1
0
        private DataTable MyBind(int psize, int cpage)
        {
            M_ModelInfo modMod = modBll.SelReturnModel(pubMod.PubModelID);

            string where = "1=1 ";
            List <SqlParameter> sp = new List <SqlParameter>();

            if (!string.IsNullOrEmpty(skey.Value))
            {
                if (!IsExistInFieldDT(skey_dp.SelectedValue))
                {
                    function.WriteErrMsg("搜索的字段不存在");
                }
                where += " AND " + skey_dp.SelectedValue + " LIKE @skey";
                sp.Add(new SqlParameter("skey", "%" + skey.Value.Trim() + "%"));
            }
            if (Status != -100)
            {
                where += " AND PubStart=" + Status;
            }
            if (ParentID > 0)
            {
                where += " AND Parentid=" + ParentID;
            }
            setting = PageSetting.Single(cpage, psize, modMod.TableName, "ID", where, "ID DESC", sp);
            DBCenter.SelPage(setting);
            foreach (DataRow dr in setting.dt.Rows)
            {
                dr["PubIP"] = dr["PubIP"] + "(" + IPScaner.IPLocation(DataConvert.CStr(dr["PubIP"])) + ")";
            }
            RPT.ItemCount = setting.itemCount;
            return(setting.dt);
        }
예제 #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            ZoomLa.Common.function.AccessRulo();
            if (!this.Page.IsPostBack)
            {
                B_Admin badmin = new B_Admin();

                if (!B_ARoleAuth.Check(ZLEnum.Auth.model, "ShopModelEdit"))
                {
                    function.WriteErrMsg("没有权限进行此项操作");
                }
                if (string.IsNullOrEmpty(base.Request.QueryString["FieldID"]))
                {
                    function.WriteErrMsg("没有指定要修改字段的字段ID!");
                }
                int FieldID = DataConverter.CLng(base.Request.QueryString["FieldID"]);
                int ModelID = DataConverter.CLng(base.Request.QueryString["ModelID"]);
                this.HdfFieldID.Value = FieldID.ToString();
                M_ModelField field = this.bll.GetModelByIDXML(FieldID);
                ModelID = field.ModelID;
                // M_ModelField field = this.bll.GetModelByID(ModelID.ToString(), FieldID);
                //int ModelID = field.ModelID;
                M_ModelInfo model = this.bModel.GetModelById(ModelID);
                this.lblModel.Text    = model.ModelName;
                this.HdfModelID.Value = ModelID.ToString();
                this.GetShow(field);
            }
        }
예제 #3
0
        public IActionResult ClientView()
        {
            if (Mid < 1)
            {
                return(WriteErr("未指定客户信息")); return(null);
            }
            if (!B_ARoleAuth.AuthCheckEx(ZLEnum.Auth.office, "crm"))
            {
                return(null);
            }
            M_CRMS_Client clientMod = new M_CRMS_Client();
            M_ModelInfo   modMod    = modBll.SelReturnModel(48);

            ViewBag.fieldDT = new B_ModelField().SelByModelID(modMod.ModelID, false, false);

            clientMod = clientBll.SelReturnModel(Mid);
            if (!string.IsNullOrEmpty(modMod.TableName) && clientMod.ItemID > 0)
            {
                ViewBag.valueDT = DBCenter.Sel(modMod.TableName, "ID=" + clientMod.ItemID);
            }
            ViewBag.conSetting = contactBll.SelPage(CPage, PSize, new F_CRMS_Contact()
            {
                ClientID = clientMod.ID
            });
            if (!string.IsNullOrEmpty(clientMod.LinkIds))
            {
                SafeSC.CheckIDSEx(clientMod.LinkIds);
                ViewBag.linkDT = DBCenter.SelWithField(clientMod.TbName, "id,ClientName AS name,phone", "ID IN (" + clientMod.LinkIds + ")");
            }
            return(View(clientMod));
        }
 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);
     }
 }
예제 #5
0
파일: SD_Model.cs 프로젝트: zwt-zf/cms
        /// <summary>
        /// 更新模型信息
        /// </summary>
        /// <param name="ModelInfo">模型的新信息</param>
        /// <returns>返回更新状态 成功为true</returns>
        bool ID_Model.Update(M_ModelInfo ModelInfo)
        {
            string strSql = "PR_Model_Add";

            SqlParameter[] cmdParams = GetParameters(ModelInfo);
            return(SqlHelper.ExecuteProc(strSql, cmdParams));
        }
예제 #6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!this.Page.IsPostBack)
            {
                B_Admin badmin = new B_Admin();
                if (!B_ARoleAuth.Check(ZLEnum.Auth.model, "ModelEdit"))
                {
                    function.WriteErrMsg("没有权限进行此项操作");
                }
                if (string.IsNullOrEmpty(base.Request.QueryString["FieldID"]))
                {
                    function.WriteErrMsg("没有指定要修改字段的字段ID!");
                }
                int FieldID = DataConverter.CLng(base.Request.QueryString["FieldID"]);
                int ModelID = DataConverter.CLng(base.Request.QueryString["ModelID"]);

                this.HdfFieldID.Value = FieldID.ToString();
                M_ModelField field = this.bll.GetModelByID(ModelID.ToString(), FieldID);
                //int ModelID = field.ModelID;
                this.m_mdid = ModelID.ToString();
                M_ModelInfo model = this.bModel.GetModelById(ModelID);
                this.Literal1.Text    = model.ModelName;
                Label1.Text           = "当前表:" + model.TableName;
                this.HdfModelID.Value = ModelID.ToString();
                this.GradeOptionType_Cate.DataSource     = B_GradeOption.GetCateList();
                this.GradeOptionType_Cate.DataTextField  = "CateName";
                this.GradeOptionType_Cate.DataValueField = "CateID";
                this.GradeOptionType_Cate.DataBind();
                this.GradeOptionType_Cate.Items.Insert(0, new ListItem("选择多级选项分类", "0"));
                this.GetShow(field);
                Call.SetBreadCrumb(Master, "<li>后台管理</li><li>企业黄页</li><li><a href='/manage/Page/PageModelManage.aspx'>模型管理</a></li><li>修改[" + model.ModelName + "模型]字段</li>");
            }
        }
예제 #7
0
 protected void EBtnSubmit_Click(object sender, EventArgs e)
 {
     if (this.Page.IsValid)
     {
         M_ModelInfo info = new M_ModelInfo();
         info.ModelID   = DataConverter.CLng(this.HdnModelId.Value);
         info.ModelName = this.TxtModelName.Text.Trim();
         if (info.ModelID > 0)
         {
             info.TableName = this.TxtTableName.Text.Trim();
         }
         else
         {
             info.TableName = this.LblTablePrefix.Text + this.TxtTableName.Text.Trim();
         }
         info.Description   = this.TxtDescription.Text.Trim();
         info.ModelType     = 3;
         info.ItemName      = "";
         info.ItemIcon      = "";
         info.ItemUnit      = "";
         info.ContentModule = "";
         if (info.ModelID > 0)
         {
             this.bll.UpdateModel(info);
         }
         else
         {
             this.bll.AddUserModel(info);
         }
         Response.Redirect("UserModelManage.aspx");
     }
 }
예제 #8
0
        public ActionResult MyContent()
        {
            string Status = DataConverter.CStr(Request["status"]);

            if (NodeID != 0)
            {
                M_Node     nod            = nodeBll.SelReturnModel(NodeID);
                M_Templata tempMod        = tempBll.SelReturnModel(NodeID);
                B_Page     pageBll        = new B_Page(tempMod.Modelinfo);
                string     AddContentlink = "";
                foreach (DataRow dr in pageBll.modeldt.Rows)
                {
                    M_ModelInfo infoMod = modBll.SelReturnModel(Convert.ToInt32(dr["modelid"]));
                    if (infoMod.IsNull)
                    {
                        continue;
                    }
                    AddContentlink += "<a href='AddContent?NodeID=" + NodeID + "&ModelID=" + infoMod.ModelID + "' class='btn btn-info' style='margin-right:5px;' target='_parent'><i class='zi zi_plus'></i> 添加" + infoMod.ItemName + "</a>";
                }
                ViewBag.addhtml = AddContentlink;
            }
            M_PageReg prMod = regBll.SelModelByUid(mu.UserID);

            ViewBag.pageid = DataConverter.CLng(prMod.ID);
            ViewBag.NodeID = NodeID;
            ViewBag.Status = Status;
            ViewBag.PageID = prMod.ID;
            PageSetting setting = conBll.Page_Sel(CPage, PSize, NodeID, Status, mu.UserName, Request["skey"]);

            return(View(setting));
        }
예제 #9
0
 /// <summary>
 /// [main]创建模型,表,字段
 /// </summary>
 public bool AddModel(M_ModelInfo model, string sql = "")
 {
     if (string.IsNullOrEmpty(model.ItemIcon))
     {
         model.ItemIcon = "fa fa-file";
     }                                                                           //默认模型图标
     model.TableName = model.TableName.Replace(" ", "");
     if (string.IsNullOrEmpty(model.TableName))
     {
         throw new Exception("模型表名不能为空");
     }
     if (DBCenter.DB.Table_Exist(model.TableName))
     {
         throw new Exception("模型表[" + model.TableName + "]已存在,取消创建");
     }
     model.ModelID = DBCenter.Insert(model);
     if (!string.IsNullOrEmpty(sql))
     {
         DBCenter.DB.ExecuteNonQuery(new SqlModel(sql, null));
     }
     //如果是内容模型
     if (model.TableName.ToLower().Contains("zl_c_"))
     {
         new B_ModelField().AddFroms(model.ModelID);
     }
     DBCenter.DB.Table_Add(model.TableName, new M_SQL_Field()
     {
         fieldName = "ID", fieldType = "int", ispk = true
     });
     return(true);
 }
예제 #10
0
        /// <summary>
        /// 通过ModelID ,itemID查找图片路径
        /// </summary>
        /// <param name="modelID"></param>
        /// <param name="itemID"></param>
        /// <returns></returns>
        private string GetPicPathByModelID(int modelID, int itemID)
        {
            B_Model      bm        = new B_Model();
            M_ModelInfo  modelinfo = bm.GetModelById(modelID);
            B_ModelField bmf       = new B_ModelField();
            M_ModelField mf        = bmf.GetFieldNameByMID(modelID);
            string       fieldName = "";

            if (mf != null && mf.ModelID > 0)
            {
                fieldName = mf.FieldName;
            }
            if (modelinfo != null && modelinfo.ModelID > 0)
            {
                //DataSet ds = cll.PRoContentChilds(modelinfo.TableName, itemID);
                //if (ds != null && ds.Tables[0].Rows.Count > 0)
                //{
                //    DataRow dr = ds.Tables[0].Rows[0];
                //    foreach (DataColumn item in ds.Tables[0].Columns)
                //    {
                //        if (item.ToString().Trim().Equals(fieldName))
                //        {
                //            return dr[item].ToString();
                //        }
                //    }
                //}
            }
            return("");
        }
예제 #11
0
        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;
            }
        }
예제 #12
0
        public IActionResult StoreUpdate_Submit()
        {
            M_CommonData storeMod = new M_CommonData();
            M_UserInfo   mu       = buser.SelReturnModel(DataConverter.CLng(RequestEx["UserName_H"]));

            if (Mid > 0)
            {
                storeMod = conBll.SelReturnModel(Mid);
            }
            else
            {
                storeMod.ModelID = Convert.ToInt32(modBll.SelByType("6").Rows[0]["ModelID"]);
                M_ModelInfo modMod = modBll.SelReturnModel(storeMod.ModelID);
                storeMod.TableName = modMod.TableName;
            }
            storeMod.SuccessfulUserID = mu.UserID;
            storeMod.Inputer          = mu.UserName;
            storeMod.Title            = RequestEx["UserShopName_T"];
            storeMod.DefaultSkins     = DataConverter.CLng(RequestEx["TlpView_Tlp"]);
            DataTable dt    = mfBll.GetModelFieldList(storeMod.ModelID);
            DataTable table = Call.GetDTFromMVC(dt, Request);

            table = storeBll.FillDT(storeMod, table);
            if (storeMod.GeneralID > 0)
            {
                conBll.UpdateContent(table, storeMod);
            }
            else
            {
                conBll.AddContent(table, storeMod);
            }
            return(WriteOK("操作成功", "StoreUpdate"));
        }
예제 #13
0
        protected void Page_Load(object sender, EventArgs e)
        {
            ZoomLa.Common.function.AccessRulo();
            B_Admin badmin = new B_Admin();

            if (!this.Page.IsPostBack)
            {
                int    ModelID   = string.IsNullOrEmpty(Request.QueryString["ModelID"]) ? 0 : DataConverter.CLng(Request.QueryString["ModelID"]);
                string ID        = string.IsNullOrEmpty(Request.QueryString["ID"]) ? "1" : Request.QueryString["ID"].ToString();
                string ModelName = string.IsNullOrEmpty(Request.QueryString["ModelName"]) ? "qiye" : Request.QueryString["ModelName"].ToString();
                if (ModelID <= 0)
                {
                    function.WriteErrMsg("缺少用户模型ID参数!");
                }
                M_ModelInfo model = bmodel.GetModelById(ModelID);

                this.HdnModel.Value     = ModelID.ToString();
                this.HdnModelName.Value = ModelName;
                this.HdnID.Value        = ID.ToString();

                string[] modarr = ID.Split(new char[] { '|' }, StringSplitOptions.RemoveEmptyEntries);

                //string ID = modarr[0].ToString();

                string tophtml = "<table width=\"100%\"><tr><td width=\"100px\"></td><td width = \"80%\"></td></tr>";
                string endhtml = "</table>";
                string Html    = tophtml + this.bfield.InputallHtml(ModelID, 0, new ModelConfig()) + endhtml;
                ModelHtml.Text = Html;
                // Response.Redirect("ModelInfoList.aspx?ModelID=" + ModelID.ToString());
            }
        }
예제 #14
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!this.Page.IsPostBack)
     {
         B_Admin badmin = new B_Admin();
         if (!B_ARoleAuth.Check(ZLEnum.Auth.page, "PageModel"))
         {
             function.WriteErrMsg("没有权限进行此项操作");
         }
         string id = base.Request.QueryString["ModelID"];
         if (!string.IsNullOrEmpty(id))
         {
             this.HdnModelId.Value = id;
         }
         else
         {
             this.HdnModelId.Value = "0";
             id = "0";
         }
         if (id != "0")
         {
             this.LTitle.Text = "修改申请样式";
             M_ModelInfo info = this.bll.GetModelById(DataConverter.CLng(id));
             this.TxtModelName.Text      = info.ModelName;
             this.LblTablePrefix.Text    = "";
             this.LblTablePrefix.Visible = false;
             this.TxtTableName.Text      = info.TableName;
             this.TxtDescription.Text    = info.Description;
             this.TxtTableName.Enabled   = false;
         }
     }
     Call.SetBreadCrumb(Master, "<li><a href='" + CustomerPageAction.customPath2 + "I/Main.aspx'>工作台</a></li><li><a href='PageManage.aspx'>企业黄页</a></li><li class='active'>添加申请模型</li>");
 }
예제 #15
0
    public void ChangeHref()
    {
        string modelID = "";
        int    nodeID  = 0;

        if (DataConverter.CLng(class3.SelectedValue) > 0)
        {
            nodeID  = Convert.ToInt32(class3.SelectedValue);
            modelID = nodeBll.GetNodeXML(nodeID).ContentModel;
        }
        else if (DataConverter.CLng(class2.SelectedValue) > 0)
        {
            nodeID  = Convert.ToInt32(class2.SelectedValue);
            modelID = nodeBll.GetNodeXML(nodeID).ContentModel;
        }
        else if (DataConverter.CLng(class1.SelectedValue) > 0)
        {
            nodeID  = Convert.ToInt32(class1.SelectedValue);
            modelID = nodeBll.GetNodeXML(nodeID).ContentModel;
        }
        else
        {
            nodeID  = Convert.ToInt32(class0.SelectedValue);
            modelID = nodeBll.GetNodeXML(nodeID).ContentModel;
        }
        M_ModelInfo minfo = bmode.GetModelById(Convert.ToInt32(modelID));

        Add_Href.InnerText = "添加" + minfo.ItemName;
        Add_Href.HRef      = "AddProduct.aspx?menu=Add&ModelID=" + minfo.ModelID.ToString() + "&Nodeid=" + nodeID;
    }
        private DataTable GetDT()
        {
            this.ViewState["cType"] = Request.QueryString["type"];
            this.m_type             = DataConverter.CLng(this.ViewState["cType"].ToString());
            DataTable   UserData;
            M_ModelInfo model = bmodel.GetModelById(DataConverter.CLng(this.ViewState["ModelID"].ToString()));

            //如果绑定错误模型,则不查询
            if (model.ModelType != 7)
            {
                return(new DataTable());
            }
            switch (m_type)
            {
            case 1:
                UserData = buser.GetUserModeInfo(model.TableName, 9, 111);
                break;

            case 2:
                UserData = buser.GetUserModeInfo(model.TableName, 9, 15);
                break;

            case 3:
                UserData = buser.GetUserModeInfo(model.TableName, 9, 14);
                break;

            default:
                UserData = buser.GetUserModeInfo(model.TableName, 9, 111);
                break;
            }
            return(UserData);
        }
 protected void EBtnSubmit_Click(object sender, EventArgs e)
 {
     if (this.Page.IsValid)
     {
         M_ModelInfo info = new M_ModelInfo();
         info.ModelID   = DataConverter.CLng(this.HdnModelId.Value);
         info.ModelName = this.TxtModelName.Text;
         if (info.ModelID > 0)
         {
             info.TableName = this.TxtTableName.Text;
         }
         else
         {
             info.TableName = this.LblTablePrefix.Text + this.TxtTableName.Text;
         }
         info.ItemName    = this.TxtItemName.Text;
         info.ItemUnit    = this.TxtItemUnit.Text;
         info.ItemIcon    = this.TxtItemIcon.Text;
         info.Description = this.TxtDescription.Text;
         info.ModelType   = 8;
         info.MultiFlag   = true;
         if (info.ModelID == 0)
         {
             this.bll.AddModel(info);
         }
         else
         {
             this.bll.UpdateModel(info);
         }
         function.WriteSuccessMsg("操作成功", "ProjectsModel.aspx");
     }
 }
        protected void Page_Load(object sender, EventArgs e)
        {
            B_Admin badmin = new B_Admin();

            if (!IsPostBack)
            {
                M_Pub pubinfo = pub.GetSelect(PubID);
                //string prowinfo = B_Role.GetPowerInfoByIDs(badmin.GetAdminLogin().RoleList);
                //if (!badmin.GetAdminLogin().RoleList.Contains(",1,") && !prowinfo.Contains("," + pubinfo.PubTableName + ","))
                //{
                //    function.WriteErrMsg("无权限管理该互动信息!!");
                //}
                string type = (Request.QueryString["type"] == null) ? "0" : Request.QueryString["type"].ToString();
                //----------------------
                PubName = pubinfo.PubName;
                string      ModelID = (pubinfo.PubModelID == 0) ? "0" : pubinfo.PubModelID.ToString();
                M_ModelInfo model   = bmodel.GetModelById(DataConverter.CLng(ModelID));
                this.HiddenNode.Value = "";
                if (NodeID > 0)
                {
                    this.HiddenNode.Value = "&nodeid=" + NodeID;
                }
                this.HdnModelID.Value     = ModelID.ToString();
                this.HiddenType.Value     = type;
                this.ViewState["ModelID"] = ModelID.ToString();
                this.ViewState["cType"]   = "1";
                DataBind();
            }
            Call.SetBreadCrumb(Master, "<li><a href='" + CustomerPageAction.customPath2 + "Main.aspx'>工作台</a></li><li><a href='" + CustomerPageAction.customPath2 + "Content/ContentManage.aspx'>内容管理</a></li><li><a href='" + Request.RawUrl + "'>互动模块管理</a></li><li class='active'>[" + PubName + "]互动信息</li>");
        }
예제 #19
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!this.Page.IsPostBack)
     {
         B_Admin badmin = new B_Admin();
         badmin.CheckMulitLogin();
         if (!badmin.ChkPermissions("UserModel"))
         {
             function.WriteErrMsg("没有权限进行此项操作");
         }
         string id = base.Request.QueryString["ModelID"];
         if (!string.IsNullOrEmpty(id))
         {
             this.HdnModelId.Value = id;
         }
         else
         {
             this.HdnModelId.Value = "0";
             id = "0";
         }
         if (id != "0")
         {
             M_ModelInfo info = this.bll.GetModelById(DataConverter.CLng(id));
             this.TxtModelName.Text      = info.ModelName;
             this.LblTablePrefix.Text    = "";
             this.LblTablePrefix.Visible = false;
             this.TxtTableName.Text      = info.TableName;
             this.TxtDescription.Text    = info.Description;
             this.TxtTableName.Enabled   = false;
         }
     }
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!this.Page.IsPostBack)
     {
         B_Admin badmin = new B_Admin();
         if (!B_ARoleAuth.Check(ZLEnum.Auth.model, "AddPageModel"))
         {
             function.WriteErrMsg("没有权限进行此项操作");
         }
         this.TxtItemIcon.Attributes.Add("onchange", "ChangeImgItemIcon(this.value);");
         string id = base.Request.QueryString["ModelID"];
         if (!string.IsNullOrEmpty(id))
         {
             this.HdnModelId.Value = id;
             LNav_Hid.Value        = "修改内容模型";
             this.LTitle.Text      = "修改内容模型";
             M_ModelInfo info = this.bll.GetModelById(int.Parse(id));
             this.TxtModelName.Text      = info.ModelName;
             this.LblTablePrefix.Visible = false;
             this.TxtTableName.Text      = info.TableName;
             this.TxtTableName.Enabled   = false;
             this.TxtItemName.Text       = info.ItemName;
             this.TxtItemUnit.Text       = info.ItemUnit;
             string selectValue = string.IsNullOrEmpty(info.ItemIcon) ? "Default.gif" : info.ItemIcon;
             this.TxtItemIcon.Text    = info.ItemIcon;
             this.TxtDescription.Text = info.Description;
         }
         else
         {
             this.HdnModelId.Value = "0";
         }
     }
     Call.SetBreadCrumb(Master, "<li><a href='" + CustomerPageAction.customPath2 + "I/Main.aspx'>工作台</a></li><li><a href='PageManage.aspx'>企业黄页</a></li><li><a href='ModelManage.aspx'>黄页模型管理</a></li><li>" + LNav_Hid.Value + "</li>");
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         Call.SetBreadCrumb(Master, "<li>" + Resources.L.后台管理 + "</li><li><a href='PubManage.aspx'>" + Resources.L.互动模块 + "</a></li><li><a href='PubExcel.aspx'>" + Resources.L.互动Excel配置 + "</a><a href='javascript:;' style='color:red;margin-left:5px;' title='" + Resources.L.添加 + "' onclick='Clear();'>[" + Resources.L.添加导出配置 + "]</a></li>");
         MyBind();
         if (ModelID > 0)
         {
             M_ModelInfo modeli = modBll.GetModelById(ModelID);
             if (modeli == null)
             {
                 return;
             }
             TableName_T.Text = modeli.TableName;
             DataTable tablelist = mfBll.SelByModelID(ModelID, true);
             DataTable dt = SysField_Pub(tablelist);
             string    fields = "", fieldNames = "";
             foreach (DataRow dr in dt.Rows)
             {
                 fields     += dr["FieldName"] + ",";
                 fieldNames += dr["FieldAlias"] + ",";
             }
             Fields_T.Text = fields.Trim(',');
             CNames_T.Text = fieldNames.Trim(',');
             function.Script(this, "ShowModel();");
         }
     }
 }
예제 #22
0
        public IActionResult Client_Add(M_CRMS_Client model)
        {
            model.ClientType = StrHelper.IdsFormat(RequestEx["ClientType"]);
            model.ID         = Mid;
            M_ModelInfo modMod = modBll.SelReturnModel(48);

            //DataTable fieldDT = fieldBll.SelByModelID(modMod.ModelID, false);
            //DataTable table = new Call().GetDTFromMVC(fieldDT, Request);
            model.ModelID    = modMod.ModelID;
            model.ModelTable = modMod.TableName;
            model.CUserID    = mu.UserID;
            model.LinkIds    = RequestEx["LinkIds"];
            if (model.ID < 1)
            {
                model.ID = clientBll.Insert(model, new DataTable());
            }
            else
            {
                M_CRMS_Client clientMod = clientBll.SelReturnModel(Mid);
                model.ItemID  = clientMod.ItemID;
                model.CDate   = clientMod.CDate;
                model.CUserID = clientMod.CUserID;
                model.Flow    = clientMod.Flow;
                clientBll.UpdateByID(model, new DataTable());
            }
            return(WriteOK("操作成功", "ConstPassen"));
        }
        private void RepNodeBind(int page)
        {
            if (DataConverter.CLng(this.HdnModelID.Value) > 0)
            {
                M_ModelInfo model = bmodel.GetModelById(DataConverter.CLng(this.HdnModelID.Value));

                if (model.ItemName != null)
                {
                    if (!string.IsNullOrEmpty(model.TableName))
                    {
                        if (model.TableName != "")
                        {
                            DataTable UserData = buser.GetUserModeInfo(model.TableName, 9, 9);
                            this.EGV.DataSource = UserData;
                            if (UserData != null)
                            {
                                if (UserData.Rows.Count > 0)
                                {
                                }
                            }
                        }
                    }
                }
            }
        }
예제 #24
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         string   ModeIDList = "";
         string   str        = "";
         string[] ModelID    = null;
         if (NodeID > 0)
         {
             M_Node nod = nodeBll.GetNodeXML(NodeID);
             ModeIDList = nod.ContentModel;
             ModelID    = ModeIDList.Split(',');
         }
         string tlp = " <div class='btn-group'><button type='button' class='btn btn-default dropdown-toggle' data-toggle='dropdown'>{0}管理<span class='caret'></span></button><ul class='dropdown-menu' role='menu'><li><a href='AddProduct.aspx?ModelID={1}&NodeID={2}'>添加{0}</a></li><li><a href='javascript:;' onclick='ShowImport();'>导入{0}</a></li></ul></div>";
         if (ModelID != null)
         {
             for (int i = 0; i < ModelID.Length; i++)
             {
                 M_ModelInfo model = bmode.GetModelById(DataConverter.CLng(ModelID[i]));
                 if (!string.IsNullOrEmpty(model.ItemName))
                 {
                     str += string.Format(tlp, model.ItemName, ModelID[i], NodeID);
                 }
             }
         }
         lblAddContent.Text = str;
         MyBind();
     }
 }
예제 #25
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!this.Page.IsPostBack)
            {
                B_Admin badmin = new B_Admin();
                if (!B_ARoleAuth.Check(ZLEnum.Auth.page, "PageModelManage"))
                {
                    function.WriteErrMsg("没有权限进行此项操作");
                }
                if (string.IsNullOrEmpty(base.Request.QueryString["FieldID"]))
                {
                    function.WriteErrMsg("没有指定要修改字段的字段ID!");
                }
                int FieldID = DataConverter.CLng(base.Request.QueryString["FieldID"]);
                int ModelID = DataConverter.CLng(base.Request.QueryString["ModelID"]);
                this.HdfFieldID.Value = FieldID.ToString();

                M_ModelField field = this.bll.GetModelByID(ModelID.ToString(), FieldID);
                //int ModelID = field.ModelID;

                M_ModelInfo model = this.bModel.GetModelById(ModelID);
                this.HdfModelID.Value = ModelID.ToString();
                this.GetShow(field);
                Call.SetBreadCrumb(Master, "<li>后台管理</li><li>企业黄页</li><li>字段列表</li><li>修改[" + model.ModelName + "模型]字段</li>");
            }
        }
예제 #26
0
        public ActionResult MyContent()
        {
            string Status = DataConverter.CStr(Request["status"]);

            if (NodeID != 0)
            {
                M_Node nod = nodeBll.GetNodeXML(NodeID);
                if (nod.NodeListType == 2)
                {
                    return(RedirectToAction("MyProduct", "Product"));
                }
                M_Templata tempMod        = tempBll.SelReturnModel(NodeID);
                string[]   ModelID        = tempMod.Modelinfo.Split(',');
                string     AddContentlink = "";
                for (int i = 0; i < ModelID.Length; i++)
                {
                    M_ModelInfo infoMod = modBll.SelReturnModel(DataConverter.CLng(ModelID[i]));
                    if (infoMod == null)
                    {
                        continue;
                    }
                    AddContentlink += "<a href='AddContent?NodeID=" + NodeID + "&ModelID=" + infoMod.ModelID + "' class='btn btn-info' style='margin-right:5px;'><i class='fa fa-plus'></i> 添加" + infoMod.ItemName + "</a>";
                }
                ViewBag.addhtml = AddContentlink;
            }
            DataTable RegDT = fieldBll.SelectTableName("ZL_Pagereg", "TableName like 'ZL/_Reg/_%' escape '/' and UserID='" + mu.UserID + "'");

            ViewBag.pageid = DataConverter.CLng(RegDT.Rows[0]["ID"]);
            ViewBag.NodeID = NodeID;
            ViewBag.Status = Status;
            ViewBag.PageID = prBll.GetSelectByUserID(mu.UserID).ID;
            PageSetting setting = conBll.SelContent(CPage, PSize, NodeID, Status, mu.UserName, Request["skey"], "ZL_Page");

            return(View(setting));
        }
예제 #27
0
        public IActionResult Client_Add(M_CRMS_Client model)
        {
            if (!B_ARoleAuth.AuthCheckEx(ZLEnum.Auth.office, "crm"))
            {
            }

            model.ClientType = StrHelper.IdsFormat(Request.Form["ClientType"]);
            model.ID         = Mid;
            M_ModelInfo modMod  = modBll.SelReturnModel(48);
            DataTable   fieldDT = fieldBll.SelByModelID(modMod.ModelID, false);
            DataTable   table   = Call.GetDTFromMVC(fieldDT, Request);

            model.ModelID    = modMod.ModelID;
            model.ModelTable = modMod.TableName;
            model.CAdminID   = adminMod.AdminId;
            model.LinkIds    = Request.Form["LinkIds"];
            if (model.ID < 1)
            {
                model.ID = clientBll.Insert(model, table);
            }
            else
            {
                M_CRMS_Client clientMod = clientBll.SelReturnModel(Mid);
                model.ItemID  = clientMod.ItemID;
                model.CDate   = clientMod.CDate;
                model.CUserID = clientMod.CUserID;
                model.Flow    = clientMod.Flow;
                clientBll.UpdateByID(model, table);
            }
            return(WriteOK("操作成功", "ClientList"));
        }
예제 #28
0
        public ActionResult ViewSmallPub()
        {
            int         PubID   = DataConverter.CLng(Request["pubid"]);
            int         ID      = DataConverter.CLng(Request["ID"]);
            int         Type    = DataConverter.CLng(Request["type"] ?? "1");
            M_Pub       pubMod  = pubBll.GetSelect(PubID);
            int         ModelID = pubMod == null ? 0 : pubMod.PubModelID;
            M_ModelInfo model   = modBll.GetModelById(ModelID);
            PageSetting setting = new PageSetting();

            switch (Type)
            {
            case 2:
                setting = buser.GetUserModeInfo_Page(CPage, PSize, model.TableName, ID, 19);
                break;

            case 3:
                setting = buser.GetUserModeInfo_Page(CPage, PSize, model.TableName, ID, 20);
                break;

            default:
                setting = buser.GetUserModeInfo_Page(CPage, PSize, model.TableName, ID, 13);
                break;
            }
            ViewBag.PubID     = PubID;
            ViewBag.PubType   = pubMod.PubType;
            ViewBag.ID        = ID;
            ViewBag.TableName = model.TableName;
            if (Request.IsAjaxRequest())
            {
                return(PartialView("ViewSmallPub_List", setting));
            }
            return(View(setting));
        }
예제 #29
0
        protected DataTable GetDT()
        {
            this.ViewState["cType"] = Request.QueryString["type"];
            this.m_type             = DataConverter.CLng(this.ViewState["cType"].ToString());
            DataTable   UserData;
            M_ModelInfo model = bmodel.GetModelById(DataConverter.CLng(this.HdnModelID.Value));

            try
            {
                switch (m_type)
                {
                case 1:
                    UserData = buser.GetUserModeInfo(model.TableName, DataConverter.CLng(this.HdnID.Value), 13);
                    break;

                case 2:
                    UserData = buser.GetUserModeInfo(model.TableName, DataConverter.CLng(this.HdnID.Value), 19);
                    break;

                case 3:
                    UserData = buser.GetUserModeInfo(model.TableName, DataConverter.CLng(this.HdnID.Value), 20);
                    break;

                default:
                    UserData = buser.GetUserModeInfo(model.TableName, DataConverter.CLng(this.HdnID.Value), 13);
                    break;
                }
                return(UserData);
            }
            catch (Exception)
            {
                function.WriteErrMsg("模型表[" + model.TableName + "]不存在!您可以点"); return(null);
            }
        }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!this.Page.IsPostBack)
     {
         B_Admin badmin = new B_Admin();
         if (!B_ARoleAuth.Check(ZLEnum.Auth.model, "AddPageModel"))
         {
             function.WriteErrMsg("没有权限进行此项操作");
         }
         if (string.IsNullOrEmpty(base.Request.QueryString["ModelID"]))
         {
             function.WriteErrMsg("没有指定要添加字段的模型ID!");
         }
         int ModelID = DataConverter.CLng(base.Request.QueryString["ModelID"]);
         this.HdfModelID.Value = ModelID.ToString();
         M_ModelInfo model = this.bModel.GetModelById(ModelID);
         this.HdfTableName.Value = model.TableName;
         this.GradeOptionType_Cate.DataSource     = B_GradeOption.GetCateList();
         this.GradeOptionType_Cate.DataTextField  = "CateName";
         this.GradeOptionType_Cate.DataValueField = "CateID";
         this.GradeOptionType_Cate.DataBind();
         this.GradeOptionType_Cate.Items.Insert(0, new ListItem("选择多级选项分类", "0"));
         Call.SetBreadCrumb(Master, "<li><a href='" + CustomerPageAction.customPath2 + "I/Main.aspx'>工作台</a></li><li><a href='PageManage.aspx'>企业黄页</a></li><li><a href='UserModelManage.aspx'>黄页申请设置</a></li><li><a href='UserModelField.aspx?ModelID=" + Request.QueryString["ModelID"] + "'>样式字段列表</a></li><li class='active'>添加[" + model.ModelName + "]字段</li>");
     }
 }