Пример #1
0
        public async Task <ActionResult> Create()
        {
            var model = new MenuViewModel
            {
                ParentId   = null,
                IsActive   = true,
                ParentList = await _menu.LoadParentAsync(),
                RoleList   = await _role.LoadParentAsync()
            };

            return(PartialView("Save", model));
        }
Пример #2
0
        public async Task <IHttpActionResult> GetDropdown()
        {
            var model = await _menu.LoadParentAsync();

            var result = new
            {
                Error   = false,
                Message = "",
                Data    = model
            };

            return(Ok(result));
        }