Exemplo n.º 1
0
        public async Task <IViewComponentResult> InvokeAsync()
        {
            var m_dictType = await _dictTypeService.GetAsync(m => m.Mark == "Role");

            var list_dict = _dictService.GetList(m => m.Tid == m_dictType.Id && m.Status == 1);

            return(View(list_dict));
        }
Exemplo n.º 2
0
        public async Task <IViewComponentResult> InvokeAsync(Manager request)
        {
            var m_dictType = await _dictTypeService.GetAsync(m => m.Mark == "Position");

            var list_dict = _dictService.GetList(m => m.Tid == m_dictType.Id && m.Status == 1);

            ViewBag.PositionId = request.PositionId;
            return(View(list_dict));
        }
Exemplo n.º 3
0
        public IActionResult GetAllPageList(int startPage, int pageSize, string dictName)
        {
            int rowCount = 0;
            var result   = _service.GetList(startPage, pageSize, out rowCount);

            return(Json(new
            {
                total = rowCount,
                rows = result,
            }));
        }
Exemplo n.º 4
0
        private Dict ActionType(string actionName)
        {
            //获取所有Dict的权限按钮
            var m_dictType = _DictTypeService.Get(m => m.Mark == "Role");
            var list_dict  = _DictService.GetList(m => m.Tid == m_dictType.Id);

            foreach (var item in list_dict)
            {
                if (actionName.IndexOf(item.Mark) == 0)
                {
                    return(item);
                }
            }
            var model = list_dict.FirstOrDefault(m => m.Mark.ToLower() == "get");

            return(model);
        }