private void btnAddStoreGroups_Click(object sender, EventArgs e)
        {
            frmStoreGroupsList frm = new frmStoreGroupsList();

            frm.store = this.item.Application.Store;
            DialogResult dr = frm.ShowDialog(this);

            if (dr == DialogResult.OK)
            {
                List <DataRow> rowsAdded = new List <DataRow>();
                foreach (IAzManStoreGroup sg in frm.selectedStoreGroups)
                {
                    rowsAdded.Add(this.AddStoreDataRow(sg));
                    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);
            }
            this.HourGlass(false);
        }
Beispiel #2
0
        private void btnNonMembersAddStoreGroups_Click(object sender, EventArgs e)
        {
            this.HourGlass(true);
            frmStoreGroupsList frm = new frmStoreGroupsList();

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

            this.HourGlass(true);
            if (dr == DialogResult.OK)
            {
                foreach (IAzManStoreGroup sg in frm.selectedStoreGroups)
                {
                    if (!this.NonMembersToRemove.Remove(sg.SID.StringValue))
                    {
                        if (!this.NonMembersToAdd.ContainsByObjectSid(sg.SID.StringValue) && !this.FindMember(this.applicationGroup.GetApplicationGroupNonMembers(), sg.SID.StringValue))
                        {
                            this.NonMembersToAdd.Add(new GenericMember(sg.Name, sg.SID, WhereDefined.Store));
                            this.modified = true;
                        }
                    }
                }
                this.RefreshApplicationGroupProperties();
            }
            this.HourGlass(false);
        }
 private void btnNonMembersAddStoreGroup_Click(object sender, EventArgs e)
 {
     this.HourGlass(true);
     frmStoreGroupsList frm = new frmStoreGroupsList();
     frm.store = this.storeGroup.Store;
     frm.storeGroup = this.storeGroup;
     DialogResult dr = frm.ShowDialog(this);
     this.HourGlass(true);
     if (dr == DialogResult.OK)
     {
         foreach (IAzManStoreGroup sg in frm.selectedStoreGroups)
         {
             if (!this.NonMembersToRemove.Remove(sg.SID.StringValue))
             {
                 if (!this.NonMembersToAdd.ContainsByObjectSid(sg.SID.StringValue) && !this.FindMember(this.storeGroup.GetStoreGroupNonMembers(), sg.SID))
                 {
                     this.NonMembersToAdd.Add(new GenericMember(sg.Name, sg.SID, WhereDefined.Store));
                     this.modified = true;
                 }
             }
         }
         this.RefreshStoreGroupProperties();
     }
     this.HourGlass(false);
 }
 private void btnAddStoreGroups_Click(object sender, EventArgs e)
 {
     frmStoreGroupsList frm = new frmStoreGroupsList();
     frm.store = this.item.Application.Store;
     DialogResult dr = frm.ShowDialog(this);
     if (dr == DialogResult.OK)
     {
         List<DataRow> rowsAdded = new List<DataRow>();
         foreach (IAzManStoreGroup sg in frm.selectedStoreGroups)
         {
             rowsAdded.Add(this.AddStoreDataRow(sg));
             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);
     }
     this.HourGlass(false);
 }