private void bt_AddUser_Click(object sender, EventArgs e) { UserCU AddUser_Form = new UserCU(); AddUser_Form.ShowDialog(); LoadUsers(); }
private void bt_EditUser_Click(object sender, EventArgs e) { if (dgv_Users.SelectedRows.Count == 1) { int id = int.Parse(dgv_Users.SelectedRows[0].Cells[0].Value.ToString()); string username = dgv_Users.SelectedRows[0].Cells[1].Value.ToString(); string name = dgv_Users.SelectedRows[0].Cells[2].Value.ToString(); string lastName = dgv_Users.SelectedRows[0].Cells[3].Value.ToString(); UserCU ModifyUser_Form = new UserCU(id, username, name, lastName); ModifyUser_Form.ShowDialog(); LoadUsers(); } }