Esempio n. 1
0
        public IActionResult Roles(string vsearch = "")
        {
            //var userId = userManager.GetUserId(User);
            //Profile user = _userservices.GetCurrentUser(userId);

            UserRoleForm uroles = new UserRoleForm();

            uroles.roles = _adminservices.GetRolesExt("", vsearch, true);

            uroles.response.route.Add(new routeVM()
            {
                nombre = "refreshTable", valor = "false"
            });
            uroles.response.route.Add(new routeVM()
            {
                nombre = "search", valor = vsearch
            });

            uroles.response.message = "er|NO DATOS ENCONTRADOS|Mgr ROLES";

            if (uroles.roles.Count > 0)
            {
                uroles.response.message = "ok|Usuarios Leidos|Usuarios";
            }

            return(View(uroles));
        }
        private void OnAddClick(object sender, EventArgs e)
        {
            UserRole obj = new UserRole();

            if (UserRoleForm.ShowForm(obj))
            {
                this.LoadListData(obj);
            }
        }
        private void OnOpenClick(object sender, EventArgs e)
        {
            UserRole obj = this.GetSelected();

            if (obj != null)
            {
                obj.RefershData();
            }

            if (UserRoleForm.ShowForm(obj))
            {
                this.LoadListData(obj);
            }
        }
        public IActionResult Put([FromBody] UserRoleForm form)
        {
            try
            {
                if (!_roleService.AddRoleToUser(form.GoTag, form.RoleName))
                {
                    return(NotFound());
                }
            }
            catch (RoleException exception)
            {
                return(Problem(exception.Result.ToString(), statusCode: (int)exception.HttpStatusCode, type: ((int)exception.Result).ToString()));
            }

            return(Ok());
        }
Esempio n. 5
0
        private void UserRole_btn_Click(object sender, EventArgs e)
        {
            UserRoleForm userRoleFrm = new UserRoleForm();

            userRoleFrm.ShowDialog();
        }
Esempio n. 6
0
        //用户角色
        private void button19_Click(object sender, EventArgs e)
        {
            UserRoleForm userRoleForm = new UserRoleForm();

            userRoleForm.Show();
        }
Esempio n. 7
0
 private void UserRoles_btn_Click(object sender, EventArgs e)
 {
     Com.Nidec.Mes.GlobalMasterMaintenance.UserRoleForm userrole = new UserRoleForm();
     userrole.Show();
 }