Пример #1
0
        public ActionResult AjaxUserForm()
        {
            var list = _dnUserIsnRole.GetListByRoleId(UserItem.AgencyID, GuiId.FirstOrDefault());

            ViewBag.Department = _departmentApi.GetAll(UserItem.AgencyID);
            return(View(list));
        }
Пример #2
0
        public ActionResult AjaxForm()
        {
            var model = new DNTreeItem();

            if (DoAction == ActionType.Edit)
            {
                model = _api.GetDNTreeItem(ArrId.FirstOrDefault());
            }

            model.ParentID     = model.ParentID ?? ArrId.FirstOrDefault();
            ViewBag.Roles      = _roleApi.GetAll(UserItem.AgencyID);
            ViewBag.Tree       = _api.GetListParent(UserItem.AgencyID);
            ViewBag.Department = _departmentApi.GetAll(UserItem.AgencyID);
            ViewBag.AgencyID   = UserItem.AgencyID;
            ViewBag.Action     = DoAction;
            return(View(model));
        }