void AddEditPersonRoute(PharmaBusinessObjects.Master.PersonRouteMaster model) { frmPersonRouteMasterAddUpdate frmPersonRouteMasterAddUpdate = new frmPersonRouteMasterAddUpdate(model); frmPersonRouteMasterAddUpdate.IsInChildMode = true; frmPersonRouteMasterAddUpdate.FormClosed -= frmPersonRouteMasterAddUpdate_FormClosed; frmPersonRouteMasterAddUpdate.FormClosed += frmPersonRouteMasterAddUpdate_FormClosed; frmPersonRouteMasterAddUpdate.ShowDialog(); }
private void EditPersonRoute() { if (dgvPersonRoute.SelectedRows.Count == 0) { MessageBox.Show("Please select at least one row to edit"); } PharmaBusinessObjects.Master.PersonRouteMaster model = (PharmaBusinessObjects.Master.PersonRouteMaster)dgvPersonRoute.SelectedRows[0].DataBoundItem; AddEditPersonRoute(model); }
private void DgvPersonRoute_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { try { if (e.RowIndex != -1) { PharmaBusinessObjects.Master.PersonRouteMaster model = (PharmaBusinessObjects.Master.PersonRouteMaster)dgvPersonRoute.Rows[e.RowIndex].DataBoundItem; AddEditPersonRoute(model); } } catch (Exception ex) { MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
internal int UpdatePersonRoute(PharmaBusinessObjects.Master.PersonRouteMaster p) { return(new PersonRouteMasterDao(this.LoggedInUser).UpdatePersonRoute(p)); }