コード例 #1
0
        public async Task <IActionResult> ShowRole()
        {
            var roles = await _roleSever.GetAllRole();

            ShowRole showRole = new ShowRole();

            showRole.ShowRoles = roles;
            return(View(showRole));
        }
コード例 #2
0
        public ShowRole GetAllot([FromForm] RBAC_Allots model)
        {
            int Rowcount             = 0;
            List <RBAC_Allots> slist = _allotinterface.GetAllot(model.PageIndex, model.PageSize, model.Dep_Name, ref Rowcount);
            int count = (Rowcount / model.PageSize) + (Rowcount % model.PageSize > 0 ? 1 : 0);

            ShowRole show = new ShowRole();

            show.alist = slist;
            show.Count = count;
            return(show);
        }
コード例 #3
0
        //显示角色管理
        public ShowRole GetRole([FromForm] RBAC_Role model)
        {
            int Rowcount = 0;

            List <RBAC_Role> Rlist = _roleInterface.GetRole(model.PageIndex, model.PageSize, model.Role_Account, model.Role_Name, model.Job_Name, model.Role_State, ref Rowcount);
            int count = (Rowcount / model.PageSize) + (Rowcount % model.PageSize > 0 ? 1 : 0);

            foreach (var item in Rlist)
            {
                item.CreateDate = item.Role_Create.ToString("yyyy-MM-dd");
                item.Role_Tel   = item.Role_Tel.Substring(0, 3) + "××××××××";
            }
            ShowRole show = new ShowRole();

            show.list  = Rlist;
            show.Count = count;
            return(show);
        }