示例#1
0
        public ActionResult PageTemplateAdd()
        {
            M_PageReg  regMod  = new M_PageReg();
            M_Templata tempMod = new M_Templata();

            regMod = regBll.SelReturnModel(RegID);
            if (Mid > 0)
            {
                tempMod = tempBll.SelReturnModel(Mid);
                regMod  = regBll.SelModelByUid(tempMod.UserID);
                RegID   = regMod.ID;
            }
            //用户所属RegID,公有为-1
            if (regMod == null)
            {
                function.WriteErrMsg("RegID参数错误"); return(null);
            }
            DataTable templist = tempBll.Sel(regMod.UserID);
            DataTable styleDT  = styleBll.Sel();
            B_Page    pageBll  = new B_Page(tempMod.Modelinfo);

            pageBll.moddt     = modBll.SelByType("4");
            ViewBag.pageBll   = pageBll;
            ViewBag.styleList = MVCHelper.ToSelectList(styleDT, "PageNodeName", "PageNodeName", tempMod.UserGroup);
            ViewBag.templist  = templist;
            return(View(tempMod));
        }
        protected string GetProName(int num)
        {
            B_Page pll       = new B_Page();
            M_Page pageinfo  = pll.GetSelect(Mid);
            string returntxt = "";

            switch (num)
            {
            case 1:
                returntxt = pageinfo.Proname;
                break;

            case 2:
                returntxt = pageinfo.Proname;
                break;

            case 3:
                returntxt = pageinfo.LOGO;
                break;

            case 4:
                returntxt = pageinfo.PageInfo;
                break;
            }
            return(returntxt);
        }
示例#3
0
        public void Node_Add()
        {
            B_Page     pageBll  = new B_Page();
            M_PageReg  pageinfo = regBll.SelModelByUid(mu.UserID);
            M_Templata model    = new M_Templata();

            if (Mid > 0)
            {
                model = tempBll.SelReturnModel(Mid);
            }
            model.OrderID         = DataConverter.CLng(Request.Form["OrderID"]);
            model.PageMetakeyinfo = Request.Form["PageMetakeyinfo"];
            model.PageMetakeyword = Request.Form["PageMetakeyword"];
            model.TemplateName    = Request.Form["TemplateName"];
            model.ParentID        = 0;//用户暂不可建多级栏目
            model.Modelinfo       = nodeBll.GetNodeXML(model.ParentNode).ContentModel;
            model.UserGroup       = pageinfo.NodeStyle.ToString();
            model.Nodeimgtext     = Request.Form["Nodeimgtext"];
            model.TemplateUrl     = Request.Form["TemplateUrl_hid"];
            model.Modelinfo       = pageBll.GetSubmitModelChk(Request);
            if (model.TemplateID > 0)
            {
                tempBll.UpdateByID(model);
            }
            else
            {
                model.UserID   = mu.UserID;
                model.Username = mu.UserName;
                tempBll.insert(model);
            }
            function.WriteSuccessMsg("操作成功!", "ClassManage"); return;
        }
示例#4
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));
        }
示例#5
0
        public ActionResult AddNode()
        {
            if (!SiteConfig.YPage.UserCanNode)
            {
                function.WriteErrMsg("不允许自建栏目!"); return(Content(""));
            }
            M_Templata model   = new M_Templata();
            B_Page     pageBll = new B_Page();
            string     op      = "添加栏目";

            if (Mid > 0)
            {
                op      = "修改栏目";
                model   = tempBll.SelReturnModel(Mid);
                pageBll = new B_Page(model.Modelinfo);
            }
            pageBll.moddt   = modBll.SelByType("4");
            ViewBag.op      = op;
            ViewBag.pageBll = pageBll;
            return(View(model));
        }