Example #1
0
        private void toolStripButton1_Click(object sender, EventArgs e)
        {
            AddGroup form = new AddGroup(admin);

            form.Owner = this;

            if (form.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                admin.ShowGroups(dataGridView1);
            }
        }
Example #2
0
        private void toolStripButton3_Click(object sender, EventArgs e)
        {
            if (dataGridView1.GetCellCount(DataGridViewElementStates.Selected) > 0)
            {
                AddGroup form = new AddGroup(admin, true, dataGridView1.SelectedRows[0].Cells[0].Value.ToString(), dataGridView1.SelectedRows[0].Cells[1].Value.ToString(), dataGridView1.SelectedRows[0].Cells[2].Value.ToString());
                form.Owner = this;

                if (form.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                {
                    admin.ShowGroups(dataGridView1);
                }
            }
        }