예제 #1
0
 public ActionResult Save(string verId)
 {
     if (!verId.IsNullOrEmpty())
     {
         var obj = ProductRoleVerService.Get(verId);
         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");
         if (!obj.ModuleId.IsNullOrEmpty())
         {
             ViewBag.usecode = "v" + ProductModelVerService.Get(obj.ModuleId).VerCode.ToString("f1");
         }
         var model = ProductModelVerService.GetOfficialLast(obj.ProductId);
         ViewBag.newcode = model == null?"": "v" + model.VerCode.ToString("f1");
     }
     else
     {
         ViewBag.products = ListToSelect(ProductRoleVerService.GetProductVers().Select(o => new SelectListItem()
         {
             Text = "(" + o.ProductId + ")" + o.SysName, Value = o.ProductId.ToString()
         }), emptyTitle: "请选择");
         ViewBag.state  = "未发布,未生效";
         ViewBag.status = "--";
     }
     return(View());
 }
예제 #2
0
        public ActionResult FindPageList()
        {
            int count = 0;
            var list  = ProductRoleVerService.GetPageList(Request.Params, out count);

            return(ToDataGrid(list, count));
        }
예제 #3
0
 public ActionResult FindMenuList(int?productId, int?roleId, string verId, short?detail)
 {
     if (productId.HasValue && roleId.HasValue)
     {
         var list = ProductRoleVerService.FindMenuList(productId.Value, roleId.Value, verId, detail == 1);
         return(new JsonNetResult(list));
     }
     return(null);
 }
예제 #4
0
        public ActionResult SaveRole(int?id, string verId)
        {
            var role = new ProductRole()
            {
                RoleVerId = verId
            };

            if (id.HasValue)
            {
                role = ProductRoleVerService.GetRole(id.Value);
            }
            return(View(role));
        }
예제 #5
0
        public ActionResult SaveLimits(string verId, int roleId, string menuIds, string limitIds)
        {
            var re = ProductRoleVerService.SaveLimits(verId, roleId, menuIds, limitIds);

            return(new OpActionResult(re));
        }
예제 #6
0
        public ActionResult Save(string roleVerId, string moduleId, int?productId, string title)
        {
            var re = ProductRoleVerService.SaveRole(roleVerId, moduleId, productId, title);

            return(new OpActionResult(re));
        }
예제 #7
0
 public ActionResult RemoveRole(int[] ids)
 {
     return(new OpActionResult(ProductRoleVerService.RemoveRole(ids)));
 }
예제 #8
0
 public ActionResult SaveRole(ProductRole obj)
 {
     return(new OpActionResult(ProductRoleVerService.SaveRole(obj)));
 }
예제 #9
0
        public ActionResult RoleList(string verId)
        {
            var list = ProductRoleVerService.RoleList(verId);

            return(ToDataGrid(list, 0));
        }
예제 #10
0
        public ActionResult Publish(string verId, short state)
        {
            var re = ProductRoleVerService.Publish(verId, state);

            return(new OpActionResult(re));
        }
예제 #11
0
        public ActionResult Copy(string verId)
        {
            var re = ProductRoleVerService.Copy(verId);

            return(new OpActionResult(re));
        }
예제 #12
0
 public void MoveMenuItem(short mode, int menuId, int roleId, string verId)
 {
     ProductRoleVerService.MoveMenuItem(mode, menuId, roleId, verId);
 }
예제 #13
0
        public ActionResult FindTreeList(string verId)
        {
            var list = ProductRoleVerService.FindTreeList(verId);

            return(new JsonNetResult(list));
        }
예제 #14
0
 public ActionResult Delete(int[] ids)
 {
     return(new JsonNetResult(ProductRoleVerService.Deletes(ids)));
 }