Example #1
0
        public ActionResult Edit(int id, int memberGradeId = 0)
        {
            var memberBll       = new MemberService();
            var memberGradeList = memberBll.GetMembershipsGradeList();

            ViewBag.MemberGrade    = memberGradeList;
            ViewBag.CheckCycle     = CheckCycleDllList();
            ViewBag.PermissionType = PermissionTypeDllList();
            if (id <= 0)
            {
                ViewBag.Title = "添加用户权益信息";
                return(View(new UserPermissionModel()
                {
                    MembershipsGradeId = memberGradeId
                }));
            }
            else
            {
                ViewBag.Title = "编辑用户权益信息";
                var model = DALUserPermission.GetModelById(id);
                if (model == null)
                {
                    model = new UserPermissionModel();
                }
                return(View(model));
            }
        }