Exemplo n.º 1
0
 private void BtnEditPORepo_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
 {
     try
     {
         if (uCPO.POGridView.GetFocusedRow() is PurchaseOrders item)
         {
             frmAddEditPO frm = new frmAddEditPO(MethodType.Edit, item);
             frm.ShowDialog();
             ((ILoad <PurchaseOrders>) this).Init();
         }
     }
     catch (Exception exception)
     {
         MessageBox.Show(exception.Message, exception.Message, MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Exemplo n.º 2
0
 private void BtnNew_Click(object sender, EventArgs e)
 {
     try
     {
         frmAddEditPO frm = new frmAddEditPO(MethodType.Add, new PurchaseOrders()
         {
             PRId = purchaseRequests.Id
         });
         frm.ShowDialog();
         ((ILoad <PurchaseOrders>) this).Init();
     }
     catch (Exception exception)
     {
         MessageBox.Show(exception.Message, exception.Message, MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }