private void barButtonItem18_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { frmReceipts frm = new frmReceipts(); frm.MdiParent = this; frm.Show(); }
public void SBO_Application_MenuEvent(ref SAPbouiCOM.MenuEvent pVal, out bool BubbleEvent) { BubbleEvent = true; try { if (pVal.BeforeAction) { switch (pVal.MenuUID) { //case "UGRS.AddOn.Purchases.Form1": // frmPurchaseNotes lObjfrmPurchaseNote = new frmPurchaseNotes(new "001", "CR_CORRA", "6010030002000", TypeEnum.Type.Refund, "2050060000000", "", true, "", ""); // lObjfrmPurchaseNote.UIAPIRawForm.Left = 500; // lObjfrmPurchaseNote.UIAPIRawForm.Top = 10; // lObjfrmPurchaseNote.Show(); // break; //case "UGRS.AddOn.Purchases.frmPurchaseXML": // frmPurchaseXML lObjfrmPurchaseXML = new frmPurchaseXML("01", "CR_CORRA", "", "01", "", new Core.SDK.DI.Purchases.Tables.Vouchers()); // lObjfrmPurchaseXML.UIAPIRawForm.Left = 500; // lObjfrmPurchaseXML.UIAPIRawForm.Top = 10; // lObjfrmPurchaseXML.Show(); // break; case "UGRS.AddOn.Purchases.frmReceipts": frmReceipts lObjfrmReceipts = new frmReceipts(TypeEnum.Type.Refund); lObjfrmReceipts.UIAPIRawForm.Left = 500; lObjfrmReceipts.UIAPIRawForm.Top = 10; lObjfrmReceipts.Show(); break; case "UGRS.AddOn.Purchases.frmCheeckingCosts": frmCheeckingCosts lObjfrmCheeckingCost = new frmCheeckingCosts(); lObjfrmCheeckingCost.UIAPIRawForm.Left = 500; lObjfrmCheeckingCost.UIAPIRawForm.Top = 10; lObjfrmCheeckingCost.Show(); break; case "UGRS.AddOn.Purchases.frmSearchRefunds": frmSearchRefunds lObjfrmSearchRefounds = new frmSearchRefunds(); lObjfrmSearchRefounds.UIAPIRawForm.Left = 500; lObjfrmSearchRefounds.UIAPIRawForm.Top = 10; lObjfrmSearchRefounds.Show(); break; case "UGRS.AddOn.Purchases.frmXML": frmPurchaseXML lObjfrmPurchaseXML = new frmPurchaseXML(); lObjfrmPurchaseXML.UIAPIRawForm.Left = 500; lObjfrmPurchaseXML.UIAPIRawForm.Top = 10; lObjfrmPurchaseXML.Show(); break; } } } catch (Exception ex) { Application.SBO_Application.MessageBox(ex.ToString(), 1, "Ok", "", ""); } }
private void LoadFormReceipt() { try { if (mIntRowSelected > 0 && mtxCosts.IsRowSelected(mIntRowSelected)) { string pStrRowCode = DtMatrix.GetValue("C_Folio", mIntRowSelected - 1).ToString(); //List<Vouchers> lObjVouchers = mObjPurchasesDAO.GetVouches(pStrRowCode); //if (lObjVouchers.Count() > 0) //{ // frmReceipts lObjfrmReceipts = new frmReceipts(pStrRowCode); // lObjfrmReceipts.Show(); //} //else //{ string lStrArea = DtMatrix.GetValue("C_Area", mIntRowSelected - 1).ToString(); string lStrEmployee = DtMatrix.GetValue("C_Employe", mIntRowSelected - 1).ToString(); string lStrFolio = DtMatrix.GetValue("C_Folio", mIntRowSelected - 1).ToString(); string lStrEmpId = DtMatrix.GetValue("C_EmpId", mIntRowSelected - 1).ToString(); string lStrStatus = DtMatrix.GetValue("C_Status", mIntRowSelected - 1).ToString(); string lStrCode = mObjPurchasesServiceFactory.GetPurchaseCheeckingCostService().CheckingCost(lStrFolio); if (string.IsNullOrEmpty(lStrStatus) && !string.IsNullOrEmpty(lStrCode)) { UIApplication.ShowMessageBox("Ya existe un comprobante registrado"); } else if (!string.IsNullOrEmpty(lStrCode)) { frmReceipts lObjfrmReceipts = new frmReceipts(lStrCode, TypeEnum.Type.Voucher); lObjfrmReceipts.UIAPIRawForm.Left = 500; lObjfrmReceipts.UIAPIRawForm.Top = 10; lObjfrmReceipts.Show(); } else { frmReceipts lObjfrmReceipts = new frmReceipts(lStrArea, lStrEmployee, lStrEmpId, lStrFolio, TypeEnum.Type.Voucher); lObjfrmReceipts.UIAPIRawForm.Left = 500; lObjfrmReceipts.UIAPIRawForm.Top = 10; lObjfrmReceipts.Show(); } //} } else { UIApplication.ShowMessageBox("Favor de seleccionar una linea"); } } catch (Exception ex) { LogService.WriteError("(btnEdit_ClickBefore): " + ex.Message); LogService.WriteError(ex); } }
private void LoadFormReceipts() { try { if (mIntRowSelected > 0) { string pStrRowCode = DtMatrix.GetValue("C_RowCode", mIntRowSelected - 1).ToString(); frmReceipts lObjfrmReceipts = new frmReceipts(pStrRowCode, TypeEnum.Type.Refund); lObjfrmReceipts.UIAPIRawForm.Left = 500; lObjfrmReceipts.Show(); } else { UIApplication.ShowMessageBox("Favor de seleccionar un registro"); } } catch (Exception ex) { LogService.WriteError("frmSearchRefunds (btnReview_ClickBefore) " + ex.Message); LogService.WriteError(ex); } }