Пример #1
0
 private void Btn_Edit_Room_Click(object sender, EventArgs e)
 {
     if (dgv_users.SelectedRows.Count == 1)
     {
         DataGridViewRow selectedRow = dgv_users.SelectedRows[0];
         User            user        = (User)selectedRow.Tag;
         MessageBox.Show(user.ToString());
         EditUser editUser = new EditUser(users, user, usersPath, bookings, bookingsPath);
         editUser.SaveObjects += SaveObjects;
         editUser.ShowDialog();
         displayList();
     }
 }
Пример #2
0
        private void editeazaToolStripMenuItem_Click(object sender, EventArgs e)
        {
            DataGridViewCell selectedCol = dgv_users.SelectedCells[0];

            if (dgv_users.SelectedCells.Count == 1)
            {
                DataGridViewRow selectedRow = selectedCol.OwningRow;
                User            user        = (User)selectedRow.Tag;
                EditUser        editUser    = new EditUser(users, user, usersPath, bookings, bookingsPath);
                editUser.SaveObjects += SaveObjects;
                editUser.ShowDialog();
                displayList();
            }
        }