示例#1
0
        public ActionResult FindPageList()
        {
            int count = 0;
            var list  = ProductPublishVerService.GetPageList(Request.Params, out count);

            return(ToDataGrid(list, count));
        }
示例#2
0
        public ActionResult Save(int?id)
        {
            var obj = new CompanyAuthorize()
            {
                Source = 1, Way = 1, MemberShared = "Y", EffectiveDT = System.DateTime.Now.ToString("yyyy-MM-dd")
            };

            if (id.HasValue)
            {
                obj = CompAuthorService.GetOne(id.Value);
            }
            ViewBag.BusinessModes = ListToSelect(DictionaryService.GetChildList(221, false).Select(o => new SelectListItem()
            {
                Text = o.Title, Value = o.DicSN.ToString()
            }));
            ViewBag.OpenScopeIds = ListToSelect(BusinessService.GetList(false).Select(o => new SelectListItem()
            {
                Text = o.Title, Value = o.ById
            }));
            ViewBag.users = ListToSelect(UserService.GetList(false).Select(o => new SelectListItem()
            {
                Text = o.FullName, Value = o.UserId
            }), emptyTitle: "请选择");
            ViewBag.states   = EnumToSelect(typeof(CompanyAuthorizeState));
            ViewBag.products = ListToSelect(ProductPublishVerService.GetProductVerEnables().Select(o => new SelectListItem()
            {
                Text = "(" + o.ProductId + ")" + o.SysName, Value = o.ProductId.ToString()
            }), emptyTitle: "请选择");
            return(View(obj.IsNullThrow()));
        }
示例#3
0
        public ActionResult SaveSql(int id, string runSql)
        {
            var data = new ProductPublishSql()
            {
                Id     = id,
                RunSql = runSql
            };
            var re = ProductPublishVerService.SaveData(data);

            return(new OpActionResult(re));
        }
示例#4
0
        public ActionResult SeeData(int id)
        {
            var obj = ProductPublishVerService.SeeData(id);
            var sql = "";

            if (obj != null)
            {
                sql = obj.RunSql;
            }
            ViewBag.sql = sql;
            return(View());
        }
示例#5
0
        public ActionResult AppendSql(int menuId, string runSql, int verId)
        {
            var data = new ProductPublishSql()
            {
                MenuId    = menuId,
                PublishId = verId,
                RunSql    = runSql
            };
            var re = ProductPublishVerService.SaveData(data);

            return(new OpActionResult(re));
        }
示例#6
0
        public ActionResult SaveSql(int verId)
        {
            var pmenus      = new List <DropdownItem>();
            var obj         = ProductPublishVerService.Get(verId);
            var menuModelId = "";
            var runSqlWay   = 1;

            if (obj != null)
            {
                ViewBag.products = ListToSelect(ProductVerService.GetList().Select(o => new SelectListItem()
                {
                    Text = "(" + o.ProductId + ")" + o.SysName, Value = o.ProductId.ToString()
                }), emptyTitle: "请选择", selectValue: obj.ProductId);
                ViewBag.state  = obj.VerStatusTitle + "," + obj.StatusTitle;
                ViewBag.status = obj.VerCode == 0 ? "--" : "v" + obj.VerCode.ToString("f1");
                ProductModuleVer model = null;
                if (!obj.MenuModuleId.IsNullOrEmpty())
                {
                    model = ProductModelVerService.Get(obj.MenuModuleId);
                }
                else
                {
                    model = ProductModelVerService.GetOfficialLast(obj.ProductId);
                }
                if (model != null)
                {
                    menuModelId = model.ModuleId;
                    pmenus.AddRange(model.ProductMenuLimits.Where(o => o.PMenuId <= 0).OrderBy(o => o.SortOrder).Select(o => new DropdownItem()
                    {
                        Text = o.Title, Value = o.MenuId.ToString()
                    }));
                }
                if (pmenus.Any())
                {
                    pmenus[0].IsSelected = true;
                }
                runSqlWay = obj.RunSqlWay == 2?2:1;
            }
            else
            {
                ViewBag.products = ListToSelect(ProductVerService.GetList(1).Select(o => new SelectListItem()
                {
                    Text = "(" + o.ProductId + ")" + o.SysName, Value = o.ProductId.ToString()
                }), emptyTitle: "请选择");
                ViewBag.state  = "未发布,未生效";
                ViewBag.status = "--";
            }
            ViewBag.pmenus      = pmenus.ToJson();
            ViewBag.menuModelId = menuModelId;
            ViewBag.runSqlWay   = runSqlWay;
            return(View());
        }
示例#7
0
        public ActionResult Save(int?verId)
        {
            if (verId.HasValue)
            {
                ViewBag.products = ListToSelect(ProductVerService.GetList().Select(o => new SelectListItem()
                {
                    Text = "(" + o.ProductId + ")" + o.SysName, Value = o.ProductId.ToString()
                }), emptyTitle: "请选择");
            }
            else
            {
                ViewBag.products = ListToSelect(ProductPublishVerService.GetProductVers().Select(o => new SelectListItem()
                {
                    Text = "(" + o.ProductId + ")" + o.SysName, Value = o.ProductId.ToString()
                }), emptyTitle: "请选择");
            }
            ProductPublishVer ver = verId.HasValue ?ProductPublishVerService.Get(verId.Value):new ProductPublishVer();

            return(View(ver));
        }
示例#8
0
        public ActionResult Copy(int verId)
        {
            var re = ProductPublishVerService.Copy(verId);

            return(new OpActionResult(re));
        }
示例#9
0
        public ActionResult Publish(int verId, short state, bool forced = false)
        {
            var re = ProductPublishVerService.Publish(verId, state, forced);

            return(new OpActionResult(re));
        }
示例#10
0
 public ActionResult Delete(int[] ids)
 {
     return(new JsonNetResult(ProductPublishVerService.Deletes(ids)));
 }
示例#11
0
 public void MoveItem(short mode, int sn, int verId)
 {
     ProductPublishVerService.MoveItem(mode, sn, verId);
 }
示例#12
0
 public void RemoveData(int id)
 {
     ProductPublishVerService.RemoveData(id);
 }
示例#13
0
        public ActionResult DataList(int verId)
        {
            var list = ProductPublishVerService.DataList(verId);

            return(ToDataGrid(list, 0));
        }
示例#14
0
        public ActionResult Save(ProductPublishVer obj)
        {
            var re = ProductPublishVerService.SaveVer(obj);

            return(new OpActionResult(re));
        }