private void buttonDetailsReservations_Click(object sender, EventArgs e) { if (dataGridViewReservations.SelectedRows.Count == 1) { DialogResult result; FormReservationDetails form = new FormReservationDetails(); form.CurrentClient = CurrentClient; try { form.LoadReception(((GetReservedReception_Result)dataGridViewReservations.SelectedRows[0].DataBoundItem).ReceptionId); result = form.ShowDialog(); if (result == DialogResult.OK) { PopulateReceptions(); } } catch (Exception ex) { ModelError modelError = new ModelError(ex); MessageBox.Show(modelError.Message, "Information", MessageBoxButtons.OK, MessageBoxIcon.Information); } } }
private void buttonDetailsReservations_Click(object sender, EventArgs e) { if(dataGridViewReservations.SelectedRows.Count == 1) { DialogResult result; FormReservationDetails form = new FormReservationDetails(); form.CurrentClient = CurrentClient; try { form.LoadReception(((GetReservedReception_Result)dataGridViewReservations.SelectedRows[0].DataBoundItem).ReceptionId); result = form.ShowDialog(); if(result == DialogResult.OK) { PopulateReceptions(); } } catch(Exception ex) { ModelError modelError = new ModelError(ex); MessageBox.Show(modelError.Message, "Information", MessageBoxButtons.OK, MessageBoxIcon.Information); } } }