/// <summary> /// Initialize components. Called by framework after form created. /// </summary> public override void OnInitializeComponent() { this.mtxItems = ((SAPbouiCOM.Matrix)(this.GetItem("mtxItems").Specific)); this.txtDocNo = ((SAPbouiCOM.EditText)(this.GetItem("txtDocNo").Specific)); this.dtTransferItemLines = this.UIAPIRawForm.DataSources.DBDataSources.Item(string.Format("@{0}", TableNames.TransferItemsLines)); this.dpDocDate = ((SAPbouiCOM.EditText)(this.GetItem("dpDocDate").Specific)); this.mtxItems.ChooseFromListBefore += new SAPbouiCOM._IMatrixEvents_ChooseFromListBeforeEventHandler(this.mtxItems_ChooseFromListBefore); this.mtxItems.ChooseFromListAfter += new SAPbouiCOM._IMatrixEvents_ChooseFromListAfterEventHandler(this.mtxItems_ChooseFromListAfter); this.mtxItems.ClickBefore += new SAPbouiCOM._IMatrixEvents_ClickBeforeEventHandler(this.mtxItems_ClickBefore); this.btnSave = ((SAPbouiCOM.Button)(this.GetItem("1").Specific)); this.btnSave.ClickBefore += new SAPbouiCOM._IButtonEvents_ClickBeforeEventHandler(this.btnSave_ClickBefore); this.btnSave.PressedBefore += new SAPbouiCOM._IButtonEvents_PressedBeforeEventHandler(this.btnSave_PressedBefore); this.btnCancel = ((SAPbouiCOM.Button)(this.GetItem("2").Specific)); this.fldrItems = ((SAPbouiCOM.Folder)(this.GetItem("Item_5").Specific)); this.fldrCosts = ((SAPbouiCOM.Folder)(this.GetItem("Item_6").Specific)); this.mtxCost = ((SAPbouiCOM.Matrix)(this.GetItem("Item_7").Specific)); this.mtxCost.ChooseFromListAfter += new SAPbouiCOM._IMatrixEvents_ChooseFromListAfterEventHandler(this.mtxCost_ChooseFromListAfter); this.mtxCost.ClickBefore += new SAPbouiCOM._IMatrixEvents_ClickBeforeEventHandler(this.mtxCost_ClickBefore); //this.btnCalculate = ((SAPbouiCOM.Button)(this.GetItem("btnClc").Specific)); //this.btnCalculate.ClickAfter += new SAPbouiCOM._IButtonEvents_ClickAfterEventHandler(this.btnCalculate_ClickAfter); //this.btnCalculate.ClickBefore += new SAPbouiCOM._IButtonEvents_ClickBeforeEventHandler(this.btnCalculate_ClickBefore); this.btnAddRow = ((SAPbouiCOM.Button)(this.GetItem("btnAddRow").Specific)); this.btnAddRow.ClickBefore += btnAddRow_ClickBefore; this.btnAddRow.ClickAfter += btnAddRow_ClickAfter; this.mtxItems.ValidateBefore += mtxItems_ValidateBefore; this.OnCustomInitialize(); }
private void AddTab(SAPbouiCOM.Form form, int pane, string title, string refItemID, string tabID = tbCreditCard, int tabPane = 0, bool bVisible = true, int width = 0, int left = 0) { try { SAPbouiCOM.Item oItem; SAPbouiCOM.Item oItemRef; oItemRef = form.Items.Item(refItemID); oItem = form.Items.Add(tabID, SAPbouiCOM.BoFormItemTypes.it_FOLDER); oItem.Top = oItemRef.Top; oItem.Height = oItemRef.Height; oItem.Left = oItemRef.Left + oItemRef.Width + left; oItem.Width = oItemRef.Width + width; oItem.FromPane = tabPane; oItem.ToPane = tabPane + 3; oItem.Visible = bVisible; SAPbouiCOM.Folder oFolder = oItem.Specific; oFolder.Caption = title; oFolder.GroupWith(oItemRef.UniqueID); oFolder.Pane = pane; }catch (Exception ex) { errorLog(ex); } }
private void InitiallizeForm() { isForLoading = true; oForm.Freeze(true); tab1 = (SAPbouiCOM.Folder)oForm.Items.Item("21").Specific; tab3 = (SAPbouiCOM.Folder)oForm.Items.Item("19").Specific; tab4 = (SAPbouiCOM.Folder)oForm.Items.Item("35").Specific; dtHead = oForm.DataSources.DataTables.Item("dtHead"); Animals = oForm.DataSources.DataTables.Item("Animals"); DTRpt = oForm.DataSources.DataTables.Item("DTRpt"); dtPro = oForm.DataSources.DataTables.Item("dtPro"); dtReqT = oForm.DataSources.DataTables.Item("dtReqT"); dtTypeS = oForm.DataSources.DataTables.Item("dtTypeS"); ocflCard = (SAPbouiCOM.ChooseFromList)oForm.ChooseFromLists.Item("cflCard"); cflcardcode(ocflCard, "cflCard"); mtAnimals = (SAPbouiCOM.Matrix)oForm.Items.Item("mtAnimals").Specific; mtReqT = (SAPbouiCOM.Matrix)oForm.Items.Item("mtReqT").Specific; mtRpt = (SAPbouiCOM.Matrix)oForm.Items.Item("mtRpt").Specific; mtProd = (SAPbouiCOM.Matrix)oForm.Items.Item("mtProd").Specific; mtTypePRO = (SAPbouiCOM.Matrix)oForm.Items.Item("mtTypePRO").Specific; cbAT = (SAPbouiCOM.ComboBox)oForm.Items.Item("cbAT").Specific; cbAC = (SAPbouiCOM.ComboBox)oForm.Items.Item("cbAC").Specific; txQtyT = (SAPbouiCOM.EditText)oForm.Items.Item("29").Specific; txSupplier = (SAPbouiCOM.EditText)oForm.Items.Item("47").Specific; chSO = (SAPbouiCOM.CheckBox)oForm.Items.Item("chSO").Specific; chPRO = (SAPbouiCOM.CheckBox)oForm.Items.Item("crRPRO").Specific; dtHead.Rows.Add(1); dtHead.SetValue("DocDate", 0, DateTime.Now); dtHead.SetValue("PoDate", 0, DateTime.Now); dtHead.SetValue("stDate", 0, DateTime.Now.AddDays(1)); dtHead.SetValue("eDate", 0, DateTime.Now.AddDays(4)); oForm.Freeze(false); fillCB(); txQtyT.Item.Enabled = false; oForm.PaneLevel = 4; tab4.Select(); isForLoading = false; fillPO(); mtProd.Item.Visible = false; fillAThash(); RefreshForm(); }
private void desenharAba() { oItem = oForm.Items.Item("7"); oNewItem = oForm.Items.Add("Projeto2", SAPbouiCOM.BoFormItemTypes.it_FOLDER); oNewItem.Top = oItem.Top; oNewItem.Height = oItem.Height; oNewItem.Width = oItem.Width; oNewItem.Left = oItem.Left + oItem.Width; oFolderItem = ((SAPbouiCOM.Folder)(oNewItem.Specific)); oFolderItem.Caption = "Móveis (Fases)"; oFolderItem.GroupWith("7"); }
/// <summary> /// Initialize components. Called by framework after form created. /// </summary> public override void OnInitializeComponent() { this.dtBatches = this.UIAPIRawForm.DataSources.DataTables.Item("dtBatches"); this.dtSelected = this.UIAPIRawForm.DataSources.DataTables.Item("dtSelected"); this.dtDocuments = this.UIAPIRawForm.DataSources.DataTables.Item("dtDocumnts"); this.dtRecDocuments = this.UIAPIRawForm.DataSources.DataTables.Item("dtRecDocs"); this.dtRecBatches = this.UIAPIRawForm.DataSources.DataTables.Item("dtRBatches"); this.gvBatches = ((SAPbouiCOM.Grid)(this.GetItem("Batches").Specific)); this.btnRemove = ((SAPbouiCOM.Button)(this.GetItem("Remove").Specific)); this.btnSelect = ((SAPbouiCOM.Button)(this.GetItem("Select").Specific)); this.btnSave = ((SAPbouiCOM.Button)(this.GetItem("btnSave").Specific)); this.btnSave.PressedBefore += new SAPbouiCOM._IButtonEvents_PressedBeforeEventHandler(this.btnSave_PressedBefore); this.btnSave.ClickBefore += new SAPbouiCOM._IButtonEvents_ClickBeforeEventHandler(this.btnSave_ClickBefore); this.gvSelectedBatches = ((SAPbouiCOM.Grid)(this.GetItem("SlctdBtchs").Specific)); this.gvDocuments = ((SAPbouiCOM.Grid)(this.GetItem("Documents").Specific)); this.fldrIssueItems = ((SAPbouiCOM.Folder)(this.GetItem("IssBatches").Specific)); this.fldrRecItems = ((SAPbouiCOM.Folder)(this.GetItem("recBatches").Specific)); this.gvRecDocuments = ((SAPbouiCOM.Grid)(this.GetItem("RecDocs").Specific)); this.gvRecDocuments.ClickAfter += new SAPbouiCOM._IGridEvents_ClickAfterEventHandler(this.gvRecDocuments_ClickAfter); this.gvRecBatches = ((SAPbouiCOM.Grid)(this.GetItem("RecBatches").Specific)); this.gvRecBatches.ValidateAfter += new SAPbouiCOM._IGridEvents_ValidateAfterEventHandler(this.gvRecBatches_ValidateAfter); this.gvRecBatches.ValidateBefore += new SAPbouiCOM._IGridEvents_ValidateBeforeEventHandler(this.gvRecBatches_ValidateBefore); this.gvRecBatches.KeyDownAfter += new SAPbouiCOM._IGridEvents_KeyDownAfterEventHandler(this.gvRecBatches_KeyDownAfter); this.gvDocuments.ClickBefore += new SAPbouiCOM._IGridEvents_ClickBeforeEventHandler(this.gvDocuments_ClickBefore); this.gvDocuments.ValidateBefore += new SAPbouiCOM._IGridEvents_ValidateBeforeEventHandler(this.gvDocuments_ValidateBefore); this.gvDocuments.ClickAfter += new SAPbouiCOM._IGridEvents_ClickAfterEventHandler(this.gvDocuments_ClickAfter); this.btnSave.ClickAfter += new SAPbouiCOM._IButtonEvents_ClickAfterEventHandler(this.btnSave_ClickAfter); this.btnSelect.ClickAfter += new SAPbouiCOM._IButtonEvents_ClickAfterEventHandler(this.btnSelect_ClickAfter); this.btnSelect.ClickBefore += new SAPbouiCOM._IButtonEvents_ClickBeforeEventHandler(this.btnSelect_ClickBefore); this.gvBatches.ClickAfter += new SAPbouiCOM._IGridEvents_ClickAfterEventHandler(this.gvBatches_ClickAfter); this.btnRemove.ClickAfter += new SAPbouiCOM._IButtonEvents_ClickAfterEventHandler(this.btnRemove_ClickAfter); this.btnRemove.ClickBefore += new SAPbouiCOM._IButtonEvents_ClickBeforeEventHandler(this.btnRemove_ClickBefore); this.StaticText0 = ((SAPbouiCOM.StaticText)(this.GetItem("Item_8").Specific)); this.StaticText1 = ((SAPbouiCOM.StaticText)(this.GetItem("Item_9").Specific)); this.StaticText2 = ((SAPbouiCOM.StaticText)(this.GetItem("Item_10").Specific)); this.OnCustomInitialize(); }
private void desenharConteudo() { for (int i = 1; i <= 9; i++) { oNewItem = oForm.Items.Add("Folder" + i, SAPbouiCOM.BoFormItemTypes.it_FOLDER); oNewItem.Top = oForm.Items.Item("55").Top + 10; oNewItem.Height = 20; oNewItem.Width = 100; oNewItem.Left = 15 + ((i - 1) * 100); oNewItem.FromPane = 9; oNewItem.ToPane = 17; oNewItem.Visible = true; oFolderItem = ((SAPbouiCOM.Folder)(oNewItem.Specific)); if (i == 1) { oFolderItem.Caption = "Entrevista"; } if (i == 2) { oFolderItem.Caption = "Medição"; } if (i == 3) { oFolderItem.Caption = "Elaboração/Verificação"; } if (i == 4) { oFolderItem.Caption = "Apresentação/Aprovação"; } if (i == 5) { oFolderItem.Caption = "Pedido"; } if (i == 6) { oFolderItem.Caption = "Detalhamento"; } if (i == 7) { oFolderItem.Caption = "Fábrica"; } if (i == 8) { oFolderItem.Caption = "Montagem"; } if (i == 9) { oFolderItem.Caption = "Entrega"; } oFolderItem.DataBind.SetBound(true, "", "FolderDS"); if (i == 1) { oFolderItem.Select(); oFolderInicial = oFolderItem; } else { oFolderItem.GroupWith("Folder" + (i - 1)); } } Entrevista entrevista = new Entrevista(oForm); Medicao medicao = new Medicao(oForm); Elaboracao elaboracao = new Elaboracao(oForm); Verificacao verificacao = new Verificacao(oForm); Apresentacao apresentacao = new Apresentacao(oForm); Pedido pedido = new Pedido(oForm); Detalhamento detalhamento = new Detalhamento(oForm); Fabrica fabrica = new Fabrica(oForm); Montagem montagem = new Montagem(oForm); Entrega entrega = new Entrega(oForm); }
private void DoPayment() { try { if (ValidateEmptyControls()) { Application.SBO_Application.SetStatusBarMessage("Verificar campos vacíos", SAPbouiCOM.BoMessageTime.bmt_Short, true); return; } if (dtTravelExp.Rows.Count <= 0) { Application.SBO_Application.SetStatusBarMessage("No puede crear un pago sin líneas", SAPbouiCOM.BoMessageTime.bmt_Short, true); return; } if (string.IsNullOrEmpty(mStrExpDayAcct) || string.IsNullOrEmpty(mStrMinorPurchAcct) || string.IsNullOrEmpty(mStrViaticExpAcct) || string.IsNullOrEmpty(mStrViaticPaymAcct)) { Application.SBO_Application.SetStatusBarMessage("Alguna de las cuentas de configuración no tiene valor, favor de verificar", SAPbouiCOM.BoMessageTime.bmt_Short, true); return; } this.UIAPIRawForm.Freeze(true); Application.SBO_Application.ActivateMenuItem("2818"); if (!Application.SBO_Application.Menus.Item("6913").Checked) { Application.SBO_Application.ActivateMenuItem("6913");//2050 } SAPbouiCOM.EditText txtDocDate = ((SAPbouiCOM.EditText)UIApplication.GetApplication().Forms.GetForm("426", -1).Items.Item("10").Specific); txtDocDate.Value = DateTime.Now.ToString("yyyyMMdd"); SAPbouiCOM.OptionBtn optionBtnAccount = ((SAPbouiCOM.OptionBtn)UIApplication.GetApplication().Forms.GetForm("426", -1).Items.Item("58").Specific); optionBtnAccount.Selected = true; SAPbouiCOM.ComboBox cboPymtType = ((SAPbouiCOM.ComboBox)UIApplication.GetApplication().Forms.GetForm("-426", -1).Items.Item("U_GLO_PaymentType").Specific); cboPymtType.Select(PaymentsTypesEnum.TravelExpenses.Value, SAPbouiCOM.BoSearchKey.psk_ByValue); SAPbouiCOM.EditText txtCodeMov = ((SAPbouiCOM.EditText)UIApplication.GetApplication().Forms.GetForm("-426", -1).Items.Item("U_GLO_CodeMov").Specific); txtCodeMov.Value = txtFolio.Value; //SAPbouiCOM.EditText txtCostCenter = ((SAPbouiCOM.EditText)UIApplication.GetApplication().Forms.GetForm("-426", -1).Items.Item("U_GLO_CostCenter").Specific); //txtCostCenter.Value = "MQ_MAQUI"; SAPbouiCOM.ComboBox cboCostCenter = ((SAPbouiCOM.ComboBox)UIApplication.GetApplication().Forms.GetForm("-426", -1).Items.Item("U_GLO_CostCenter").Specific); cboCostCenter.Select("MQ_MAQUI", SAPbouiCOM.BoSearchKey.psk_ByValue); SAPbouiCOM.ComboBox cboAuxiliarType = ((SAPbouiCOM.ComboBox)UIApplication.GetApplication().Forms.GetForm("-426", -1).Items.Item("U_FZ_AuxiliarType").Specific); cboAuxiliarType.Select(((int)AuxiliaryTypeEnum.Employees).ToString(), SAPbouiCOM.BoSearchKey.psk_ByValue); SAPbouiCOM.EditText txtAuxiliar = ((SAPbouiCOM.EditText)UIApplication.GetApplication().Forms.GetForm("-426", -1).Items.Item("U_FZ_Auxiliar").Specific); txtAuxiliar.Value = mStrSupervisorCode; SAPbouiCOM.EditText txtFolioOri = ((SAPbouiCOM.EditText)UIApplication.GetApplication().Forms.GetForm("-426", -1).Items.Item("U_GLO_FolioOri").Specific); txtFolioOri.Value = txtRiseFolio.Value; SAPbouiCOM.EditText txtObjType = ((SAPbouiCOM.EditText)UIApplication.GetApplication().Forms.GetForm("-426", -1).Items.Item("U_GLO_ObjType").Specific); txtObjType.Value = this.UIAPIRawForm.UniqueID; SAPbouiCOM.Button btnBank = ((SAPbouiCOM.Button)UIApplication.GetApplication().Forms.GetForm("426", -1).Items.Item("234000001").Specific); btnBank.Item.Click(); SAPbouiCOM.Folder folderCash = ((SAPbouiCOM.Folder)UIApplication.GetApplication().Forms.GetForm("196", -1).Items.Item("6").Specific); folderCash.Item.Click(); SAPbouiCOM.EditText txtAccount = ((SAPbouiCOM.EditText)UIApplication.GetApplication().Forms.GetForm("196", -1).Items.Item("32").Specific); txtAccount.Value = mStrViaticPaymAcct; SAPbouiCOM.EditText txtImport = ((SAPbouiCOM.EditText)UIApplication.GetApplication().Forms.GetForm("196", -1).Items.Item("38").Specific); txtImport.Value = txtTotal.Value; SAPbouiCOM.Button btnOk = ((SAPbouiCOM.Button)UIApplication.GetApplication().Forms.GetForm("196", -1).Items.Item("1").Specific); btnOk.Item.Click(); SAPbouiCOM.Matrix mtxPayment = ((SAPbouiCOM.Matrix)UIApplication.GetApplication().Forms.GetForm("426", -1).Items.Item("71").Specific); for (int i = 0; i < dtTravelExp.Rows.Count; i++) { mtxPayment.AddRow(); string lStrMovTypeCode = dtTravelExp.GetValue(9, i).ToString(); double lDblLineImport = double.Parse(dtTravelExp.GetValue(8, i).ToString()); string lStrEmployeeType = dtTravelExp.GetValue(10, i).ToString(); string lStrEmployeeCode = dtTravelExp.GetValue(5, i).ToString(); double lDblDayPrice = double.Parse(dtTravelExp.GetValue(7, i).ToString()); if (lDblDayPrice > 0) { ((SAPbouiCOM.EditText)mtxPayment.Columns.Item("5").Cells.Item(i + 1).Specific).Value = lDblLineImport.ToString(); ((SAPbouiCOM.ComboBox)mtxPayment.Columns.Item("U_GLO_TypeViatic").Cells.Item(i + 1).Specific).Select(lStrMovTypeCode.ToString(), SAPbouiCOM.BoSearchKey.psk_ByDescription); ((SAPbouiCOM.ComboBox)mtxPayment.Columns.Item("U_MQ_TypeEmp").Cells.Item(i + 1).Specific).Select(lStrEmployeeType, SAPbouiCOM.BoSearchKey.psk_ByValue); ((SAPbouiCOM.EditText)mtxPayment.Columns.Item("U_MQ_Aux").Cells.Item(i + 1).Specific).Value = lStrEmployeeCode; ((SAPbouiCOM.EditText)mtxPayment.Columns.Item("U_MQ_DayPrice").Cells.Item(i + 1).Specific).Value = lDblDayPrice.ToString(); TravelExpMovTypesEnum lTravExpTypeEnum = TravelExpMovTypesEnum.GetEnum(lStrMovTypeCode); if (TravelExpMovTypesEnum.IsTravelExpensesType(lTravExpTypeEnum)) { ((SAPbouiCOM.EditText)mtxPayment.Columns.Item("8").Cells.Item(i + 1).Specific).Value = mStrViaticExpAcct; //cuenta de mayor } else if (TravelExpMovTypesEnum.IsDayExpensesType(lTravExpTypeEnum)) { ((SAPbouiCOM.EditText)mtxPayment.Columns.Item("8").Cells.Item(i + 1).Specific).Value = mStrExpDayAcct; //cuenta de mayor } else if (TravelExpMovTypesEnum.IsMinorExpensesType(lTravExpTypeEnum)) { ((SAPbouiCOM.EditText)mtxPayment.Columns.Item("8").Cells.Item(i + 1).Specific).Value = mStrMinorPurchAcct; //cuenta de mayor } } } this.UIAPIRawForm.Close(); #region Payment /*SAPbobsCOM.Payments lObjOutgoingPayment = (SAPbobsCOM.Payments)DIApplication.Company.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oPaymentsDrafts); * lObjOutgoingPayment.DocObjectCode = SAPbobsCOM.BoPaymentsObjectType.bopot_OutgoingPayments; * lObjOutgoingPayment.DocDate = DateTime.Now; * lObjOutgoingPayment.DocType = SAPbobsCOM.BoRcptTypes.rAccount; * lObjOutgoingPayment.CashAccount = mStrViaticPaymAcct; * lObjOutgoingPayment.UserFields.Fields.Item("U_GLO_PaymentType").Value = PaymentsTypesEnum.TravelExpenses.Value; * lObjOutgoingPayment.UserFields.Fields.Item("U_GLO_CodeMov").Value = txtFolio.Value; //folio de solicitud de viáticos * lObjOutgoingPayment.UserFields.Fields.Item("U_GLO_CostCenter").Value = "MQ_MAQUI"; //centro de costo * lObjOutgoingPayment.UserFields.Fields.Item("U_FZ_AuxiliarType").Value = ((int)AuxiliaryTypeEnum.Employees).ToString(); //tipo de auxiliar * lObjOutgoingPayment.UserFields.Fields.Item("U_FZ_Auxiliar").Value = mStrSupervisorCode; //auxiliar * lObjOutgoingPayment.UserFields.Fields.Item("U_GLO_FolioOri").Value = txtRiseFolio.Value; * lObjOutgoingPayment.UserFields.Fields.Item("U_GLO_ObjType").Value = this.UIAPIRawForm.UniqueID; * lObjOutgoingPayment.CashSum = double.Parse(txtTotal.Value); * * for (int i = 0; i < dtTravelExp.Rows.Count; i++) * { * string lStrMovTypeCode = dtTravelExp.GetValue(9, i).ToString(); * double lDblLineImport = double.Parse(dtTravelExp.GetValue(8, i).ToString()); * string lStrEmployeeType = dtTravelExp.GetValue(10, i).ToString(); * string lStrEmployeeCode = dtTravelExp.GetValue(5, i).ToString(); * double lDblDayPrice = double.Parse(dtTravelExp.GetValue(7, i).ToString()); * * if (lDblDayPrice > 0) * { * lObjOutgoingPayment.AccountPayments.SetCurrentLine(i); * lObjOutgoingPayment.AccountPayments.SumPaid = lDblLineImport; * lObjOutgoingPayment.AccountPayments.UserFields.Fields.Item("U_GLO_TypeViatic").Value = lStrMovTypeCode.ToString(); * lObjOutgoingPayment.AccountPayments.UserFields.Fields.Item("U_MQ_TypeEmp").Value = lStrEmployeeType; * lObjOutgoingPayment.AccountPayments.UserFields.Fields.Item("U_MQ_Aux").Value = lStrEmployeeCode; //code empleado * lObjOutgoingPayment.AccountPayments.UserFields.Fields.Item("U_MQ_DayPrice").Value = lDblDayPrice; * * TravelExpMovTypesEnum lTravExpTypeEnum = TravelExpMovTypesEnum.GetEnum(lStrMovTypeCode); * if (TravelExpMovTypesEnum.IsTravelExpensesType(lTravExpTypeEnum)) * { * lObjOutgoingPayment.AccountPayments.AccountCode = mStrViaticExpAcct; * } * else if (TravelExpMovTypesEnum.IsDayExpensesType(lTravExpTypeEnum)) * { * lObjOutgoingPayment.AccountPayments.AccountCode = mStrExpDayAcct; * } * else if (TravelExpMovTypesEnum.IsMinorExpensesType(lTravExpTypeEnum)) * { * lObjOutgoingPayment.AccountPayments.AccountCode = mStrMinorPurchAcct; * } * * lObjOutgoingPayment.AccountPayments.Add(); * } * } * * if (lObjOutgoingPayment.Add() != 0) * { * string lStrLastError = DIApplication.Company.GetLastErrorDescription(); * UIApplication.ShowMessageBox(string.Format("Error al generar el pago: {0}", DIApplication.Company.GetLastErrorDescription())); * } * else * { * int lIntDocEntry = int.Parse(DIApplication.Company.GetNewObjectKey()); * * mObjTravelExpensesDTO = mObjMachinerySeviceFactory.GetTravelExpensesService().GetDraftPayment(lIntDocEntry); * * UIApplication.GetApplication().OpenForm((SAPbouiCOM.BoFormObjectEnum)140, "", lIntDocEntry.ToString()); * * this.UIAPIRawForm.Close(); * }*/ #endregion } catch (Exception lObjException) { LogUtility.WriteError(string.Format("[frmTravelExpenses - DoPayment] Error al realizar el pago efectuado: {0}", lObjException.Message)); Application.SBO_Application.MessageBox(string.Format("Error al realizar el pago efectuado: {0}", lObjException.Message)); } finally { this.UIAPIRawForm.Freeze(false); } }