private void button1_Click(object sender, EventArgs e) { /*TO DO: Permissions*/ if (dataGridView1.SelectedRows.Count > 0) { int workingIndex = dataGridView1.SelectedRows[0].Index; AddEditBooking c = new AddEditBooking(); c.user = User; c.currentBookingID = ListOfBookings[workingIndex].Id; c.ShowDialog(); if (c.DialogResult == DialogResult.OK) { Rebind(); } } }
private void btnAddBooking_Click(object sender, EventArgs e) { /*TO DO: Permissions*/ AddEditBooking c = new AddEditBooking(); c.user = User; c.ShowDialog(); if (c.DialogResult == DialogResult.OK) { Rebind(); } }