Пример #1
0
        private void btnRemoveRole_Click(object sender, EventArgs e)
        {
            if (this.gridUsers.CurrentRow != null && this.gridUsers.CurrentRow != null)
            {
                var           user      = (UserDto)this.gridUsers.CurrentRow.DataRow;
                var           role      = (RoleDto)this.iGridEXRole.CurrentRow.DataRow;
                RolePresenter presenter = new RolePresenter();


                if (role != null && user != null)
                {
                    string message = string.Format("آیا از انتساب لغو نقش {0} به {1} مطمئن هستید؟", role.CondidateRoleName, user.FullName);
                    if (ISE.Framework.Client.Win.Viewer.MessageViewer.ShowAlert(message) != DialogResult.OK)
                    {
                        return;
                    }
                    view.DeAssignToRoles(user, role);
                }
            }
        }