예제 #1
0
        void AddEditPersonRoute(PharmaBusinessObjects.Master.PersonRouteMaster model)
        {
            frmPersonRouteMasterAddUpdate frmPersonRouteMasterAddUpdate = new frmPersonRouteMasterAddUpdate(model);

            frmPersonRouteMasterAddUpdate.IsInChildMode = true;

            frmPersonRouteMasterAddUpdate.FormClosed -= frmPersonRouteMasterAddUpdate_FormClosed;
            frmPersonRouteMasterAddUpdate.FormClosed += frmPersonRouteMasterAddUpdate_FormClosed;
            frmPersonRouteMasterAddUpdate.ShowDialog();
        }
예제 #2
0
        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);
        }
예제 #3
0
        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);
            }
        }
예제 #4
0
 internal int UpdatePersonRoute(PharmaBusinessObjects.Master.PersonRouteMaster p)
 {
     return(new PersonRouteMasterDao(this.LoggedInUser).UpdatePersonRoute(p));
 }