Example #1
0
 private void btnEditPQRepo_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
 {
     try
     {
         if (this.PARGridView.GetFocusedRow() is PAR item)
         {
             frmAddEditPAR frm = new frmAddEditPAR(new UnitOfWork().PARRepo.Find(x => x.Id == item.Id), MethodType.Edit);
             frm.ShowDialog();
             Init();
         }
     }
     catch (Exception exception)
     {
     }
 }
Example #2
0
 private void btnNew_Click(object sender, EventArgs e)
 {
     try
     {
         frmAddEditPAR frmAddEditPAR = new frmAddEditPAR(new PAR()
         {
             PRId = purchaseRequests.Id
         }, MethodType.Add);
         frmAddEditPAR.ShowDialog();
         Init();
     }
     catch (Exception exception)
     {
     }
 }