コード例 #1
0
 private void btnAddDBUsers_Click(object sender, EventArgs e)
 {
     try
     {
         this.HourGlass(true);
         frmDBUsersList frm = new frmDBUsersList();
         frm.application = this.item.Application;
         DialogResult dr = frm.ShowDialog(this);
         if (dr == DialogResult.OK)
         {
             List <DataRow> rowsAdded = new List <DataRow>();
             foreach (IAzManDBUser dbUser in frm.selectedDBUsers)
             {
                 rowsAdded.Add(this.AddDBUserDataRow(dbUser));
                 this.modified = true;
             }
             this.SelectDataGridViewRows(rowsAdded);
         }
         this.btnApply.Enabled = this.modified;
         //Adjust columns Width
         foreach (DataGridViewColumn dgvc in this.dgAuthorizations.Columns)
         {
             dgvc.Width = dgvc.GetPreferredWidth(DataGridViewAutoSizeColumnMode.AllCells, true);
         }
     }
     finally
     {
         this.HourGlass(false);
     }
 }
コード例 #2
0
        private void btnNonMembersAddDBUsers_Click(object sender, EventArgs e)
        {
            this.HourGlass(true);
            frmDBUsersList frm = new frmDBUsersList();

            frm.application = this.applicationGroup.Application;
            DialogResult dr = frm.ShowDialog(this);

            if (dr == DialogResult.OK)
            {
                foreach (IAzManDBUser dbUser in frm.selectedDBUsers)
                {
                    if (!this.NonMembersToRemove.Remove(dbUser.CustomSid.StringValue))
                    {
                        if (!this.NonMembersToAdd.ContainsByObjectSid(dbUser.CustomSid.StringValue) && !this.FindMember(this.applicationGroup.GetApplicationGroupNonMembers(), dbUser.CustomSid.StringValue))
                        {
                            this.NonMembersToAdd.Add(new GenericMember(dbUser.UserName, dbUser.CustomSid, WhereDefined.Database));
                            this.modified = true;
                        }
                    }
                }
                this.RefreshApplicationGroupProperties();
            }
            this.HourGlass(false);
        }
コード例 #3
0
 private void btnBrowseDBUser_Click(object sender, EventArgs e)
 {
     try
     {
         this.rbDBUser.Checked = true;
         frmDBUsersList frm = new frmDBUsersList();
         frm.application = this.application;
         DialogResult dr = frm.ShowDialog(this);
         if (dr == DialogResult.OK)
         {
             if (frm.selectedDBUsers.Length > 1)
             {
                 this.ShowError(Globalization.MultilanguageResource.GetString("frmCheckAccessTest_Msg80"), Globalization.MultilanguageResource.GetString("frmCheckAccessTest_Msg10"));
             }
             if (frm.selectedDBUsers.Length == 1)
             {
                 this.wid            = null;
                 this.dbuser         = frm.selectedDBUsers[0];
                 this.txtDBUser.Text = this.dbuser.UserName;
             }
         }
     }
     catch (Exception ex)
     {
         this.ShowError(ex.Message, Globalization.MultilanguageResource.GetString("frmCheckAccessTest_Msg10"));
     }
     finally
     {
         this.FormValidate();
     }
 }
コード例 #4
0
 private void btnMembersAddDBUsers_Click(object sender, EventArgs e)
 {
     this.HourGlass(true);
     frmDBUsersList frm = new frmDBUsersList();
     frm.store = this.storeGroup.Store;
     DialogResult dr = frm.ShowDialog(this);
     if (dr == DialogResult.OK)
     {
         foreach (IAzManDBUser dbUser in frm.selectedDBUsers)
         {
             if (!this.MembersToRemove.Remove(dbUser.CustomSid.StringValue))
             {
                 if (!this.MembersToAdd.ContainsByObjectSid(dbUser.CustomSid.StringValue) && !this.FindMember(this.storeGroup.GetStoreGroupMembers(), dbUser.CustomSid))
                 {
                     this.MembersToAdd.Add(new GenericMember(dbUser.UserName, dbUser.CustomSid, WhereDefined.Database));
                     this.modified = true;
                 }
             }
         }
         this.RefreshStoreGroupProperties();
     }
     this.HourGlass(false);
 }
コード例 #5
0
        private void btnAddDBUsers_Click(object sender, EventArgs e)
        {
            try
            {
                this.HourGlass(true);
                frmDBUsersList frm = new frmDBUsersList();
                frm.application = this.item.Application;
                DialogResult dr = frm.ShowDialog(this);
                if (dr == DialogResult.OK)
                {
                    List<DataRow> rowsAdded = new List<DataRow>();
                    foreach (IAzManDBUser dbUser in frm.selectedDBUsers)
                    {
                        rowsAdded.Add(this.AddDBUserDataRow(dbUser));
                        this.modified = true;
                    }
                    this.SelectDataGridViewRows(rowsAdded);
                }
                this.btnApply.Enabled = this.modified;
                //Adjust columns Width
                foreach (DataGridViewColumn dgvc in this.dgAuthorizations.Columns)
                {
                    dgvc.Width = dgvc.GetPreferredWidth(DataGridViewAutoSizeColumnMode.AllCells, true);
                }

            }
            finally
            {
                this.HourGlass(false);
            }
        }
コード例 #6
0
 private void btnBrowseDBUser_Click(object sender, EventArgs e)
 {
     try
     {
         this.rbDBUser.Checked = true;
         frmDBUsersList frm = new frmDBUsersList();
         frm.application = this.application;
         DialogResult dr = frm.ShowDialog(this);
         if (dr == DialogResult.OK)
         {
             if (frm.selectedDBUsers.Length > 1)
             {
                 this.ShowError(Globalization.MultilanguageResource.GetString("frmCheckAccessTest_Msg80"), Globalization.MultilanguageResource.GetString("frmCheckAccessTest_Msg10"));
             }
             if (frm.selectedDBUsers.Length == 1)
             {
                 this.wid = null;
                 this.dbuser = frm.selectedDBUsers[0];
                 this.txtDBUser.Text = this.dbuser.UserName;
             }
         }
     }
     catch (Exception ex)
     {
         this.ShowError(ex.Message, Globalization.MultilanguageResource.GetString("frmCheckAccessTest_Msg10"));
     }
     finally
     {
         this.FormValidate();
     }
 }