Exemplo n.º 1
0
        public async Task <ActionResult> CreateSysRole(SysRoleViewModel model)
        {
            if (ModelState.IsValid)
            {
                ISysRoleService sysRoleSvc = new SysRoleService();
                await sysRoleSvc.CreateSysRole(model.RoleName, model.SortOrder);

                return(RedirectToAction(nameof(SysRoleList)));
            }

            ModelState.AddModelError("", @"您录入的信息有误");
            return(View());
        }