private void EditAccountToolStripMenuItem_Click(object sender, EventArgs e) { AdminAddUpdateUserFrm adminAddUpdateUserFrm = new AdminAddUpdateUserFrm(true, currentSession.user); adminAddUpdateUserFrm.FormClosing += AdminAddUpdateUserFrm_FormClosing; adminAddUpdateUserFrm.ShowDialog(); }
private void AddUserToolStripMenuItem_Click(object sender, EventArgs e) { AdminAddUpdateUserFrm adminAddUpdateUserFrm = new AdminAddUpdateUserFrm(false); adminAddUpdateUserFrm.FormClosing += new FormClosingEventHandler(this.UsersUpdated); adminAddUpdateUserFrm.ShowDialog(); }
private void EditUserToolStripMenuItem_Click(object sender, EventArgs e) { if (usersDataGridView.Rows.Count == 0) { return; } if (usersDataGridView.SelectedRows.Count == 0) { return; } User user = new User(Convert.ToInt32(usersDataGridView.SelectedRows[0].Cells["userId"].Value)); AdminAddUpdateUserFrm adminAddUpdateUserFrm = new AdminAddUpdateUserFrm(true, user); adminAddUpdateUserFrm.FormClosing += new FormClosingEventHandler(this.UsersUpdated); adminAddUpdateUserFrm.ShowDialog(); }