Ejemplo n.º 1
0
        private void btnRemoveGrp_Click(object sender, EventArgs e)
        {
            if (this.gridUsers.CurrentRow != null && this.iGridEXGrp.CurrentRow != null)
            {
                var           user      = (UserDto)this.gridUsers.CurrentRow.DataRow;
                var           group     = (SecurityGroupDto)this.iGridEXGrp.CurrentRow.DataRow;
                RolePresenter presenter = new RolePresenter();


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