예제 #1
0
 private void добавитьToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (this.selectedTab == 0)
     {
         AddUser newUser = new AddUser();
         newUser.ShowDialog(this);
         this.generateTable();
         this.AdminGridView.DataSource            = this.elementBase.SelectUsersInfo(this.selectedUser.ID);
         this.AdminGridView.Columns["ID"].Visible = false;
     }
     else if (this.selectedTab == 1)
     {
         Groups newGroup = new Groups();
         newGroup.ShowDialog(this);
         this.generateTable();
         this.AdminGridView.DataSource            = this.elementBase.SelectGroupsInfo();
         this.AdminGridView.Columns["ID"].Visible = false;
     }
 }
예제 #2
0
 private void удалитьToolStripMenuItem_Click(object sender, EventArgs e)//це изменить
 {
     if (this.selectedTab == 0)
     {
         int     rowId   = (int)((long)AdminGridView.Rows[this.mouseLocation.RowIndex].Cells["ID"].Value);
         AddUser newUser = new AddUser(rowId);
         newUser.ShowDialog(this);
         this.generateTable();
         this.AdminGridView.DataSource            = this.elementBase.SelectUsersInfo(this.selectedUser.ID);
         this.AdminGridView.Columns["ID"].Visible = false;
     }
     else if (this.selectedTab == 1)
     {
         int    rowId    = (int)((long)AdminGridView.Rows[this.mouseLocation.RowIndex].Cells["ID"].Value);
         Groups newGroup = new Groups(rowId);
         newGroup.ShowDialog(this);
         this.generateTable();
         this.AdminGridView.DataSource            = this.elementBase.SelectGroupsInfo();
         this.AdminGridView.Columns["ID"].Visible = false;
     }
 }