public TabOrder()
        {
            AppHelper.SetApplication(ref this.oApplication);

            string strTmp = "TabOrder.srf";

            UIHelper.LoadFromXML(oApplication, ref strTmp);

            oForm  = oApplication.Forms.Item("frmTab");
            userDS = UserDataSourceHelper.AddUserDataSource(oForm, "OpBtnDS", SAPbouiCOM.BoDataType.dt_SHORT_TEXT, 1);


            oItem         = oForm.Items.Item("optHor");
            oOptionBtnHor = ((SAPbouiCOM.OptionBtn)(oItem.Specific));
            oOptionBtnHor.GroupWith("optVer");
            oOptionBtnHor.DataBind.SetBound(true, "", "OpBtnDS");

            oItem = oForm.Items.Item("optVer");

            oOptionBtnVer = ((SAPbouiCOM.OptionBtn)(oItem.Specific));
            oOptionBtnVer.GroupWith("optHor");
            oOptionBtnVer.DataBind.SetBound(true, "", "OpBtnDS");

            oOptionBtnHor.Selected = true;
            SetTabHorizontal();



            oForm.Visible = true;

            oApplication.ItemEvent += OApplication_ItemEvent;
        }
示例#2
0
        private void InitiallizeForm()
        {
            oForm.Freeze(true);

            initiallizing = true;


            dtRpt   = oForm.DataSources.DataTables.Item("dtRpt");
            dtHeads = oForm.DataSources.DataTables.Item("dtHeads");
            dtHeads.Rows.Add(1);
            mtReport = (SAPbouiCOM.Matrix)oForm.Items.Item("mtReport").Specific;
            btAct    = (SAPbouiCOM.ButtonCombo)oForm.Items.Item("btAct").Specific;
            btPL     = (SAPbouiCOM.ButtonCombo)oForm.Items.Item("btPL").Specific;

            btAct.ValidValues.Add("01", "Released");
            btAct.ValidValues.Add("02", "Canceled");


            opALL = (SAPbouiCOM.OptionBtn)oForm.Items.Item("opAO").Specific;
            opREL = (SAPbouiCOM.OptionBtn)oForm.Items.Item("opREL").Specific;
            opPL  = (SAPbouiCOM.OptionBtn)oForm.Items.Item("opPL").Specific;

            opOd = (SAPbouiCOM.OptionBtn)oForm.Items.Item("opOd").Specific;
            opDd = (SAPbouiCOM.OptionBtn)oForm.Items.Item("opDd").Specific;

            opFirst = (SAPbouiCOM.OptionBtn)oForm.Items.Item("opFirst").Specific;
            opLast  = (SAPbouiCOM.OptionBtn)oForm.Items.Item("opLast").Specific;
            opX     = (SAPbouiCOM.OptionBtn)oForm.Items.Item("opX").Specific;


            opREL.GroupWith("opAO");
            opPL.GroupWith("opAO");
            opDd.GroupWith("opOd");

            opLast.GroupWith("opFirst");
            opX.GroupWith("opFirst");
            // opLast.Selected = true;


            txProduct = (SAPbouiCOM.EditText)oForm.Items.Item("txProduct").Specific;
            txFrom    = (SAPbouiCOM.EditText)oForm.Items.Item("txFrom").Specific;
            txTo      = (SAPbouiCOM.EditText)oForm.Items.Item("txTo").Specific;

            cbFilter = (SAPbouiCOM.ComboBox)oForm.Items.Item("cbFilter").Specific;
            cbPL     = (SAPbouiCOM.ComboBox)oForm.Items.Item("cbPL").Specific;
            cbPL.ValidValues.Add("0", "All");
            fillCbs();
            //  fillReport();
            oForm.Freeze(false);

            opALL.Selected  = true;
            opOd.Selected   = true;
            opLast.Selected = true;
            initiallizing   = false;
        }
示例#3
0
        private void initOutgoingPayments()
        {
            UIApplication.GetApplication().ActivateMenuItem("2818");                              //Open Outgoing Payments Form

            mObjPayRForm   = UIApplication.GetApplication().Forms.GetFormByTypeAndCount(426, 1);  //Set Form
            mObjPayRFormUF = UIApplication.GetApplication().Forms.GetFormByTypeAndCount(-426, 1); // Set UserFields Form

            //Set Controls
            mObjtxtCardCode = (SAPbouiCOM.EditText)mObjPayRForm.Items.Item("5").Specific;
            mObjOptB        = (SAPbouiCOM.OptionBtn)mObjPayRForm.Items.Item("56").Specific;
            mObjcbAuxType   = (SAPbouiCOM.ComboBox)mObjPayRFormUF.Items.Item("U_FZ_AuxiliarType").Specific;
            mObjtxtAuctNum  = (SAPbouiCOM.EditText)mObjPayRFormUF.Items.Item("U_FZ_FolioAuction").Specific;
        }
示例#4
0
 public override void OnInitializeComponent()
 {
     this.Grid0 = ((SAPbouiCOM.Grid)(this.GetItem("grd0").Specific));
     this.Grid0.PressedAfter     += new SAPbouiCOM._IGridEvents_PressedAfterEventHandler(this.Grid0_PressedAfter);
     this.Grid0.DoubleClickAfter += new SAPbouiCOM._IGridEvents_DoubleClickAfterEventHandler(this.Grid0_DoubleClickAfter);
     this.Grid1   = ((SAPbouiCOM.Grid)(this.GetItem("grd1").Specific));
     this.Button0 = ((SAPbouiCOM.Button)(this.GetItem("Item_2").Specific));
     this.Button0.PressedAfter    += new SAPbouiCOM._IButtonEvents_PressedAfterEventHandler(this.Button0_PressedAfter);
     this.OptionBtn0               = ((SAPbouiCOM.OptionBtn)(this.GetItem("op_cur").Specific));
     this.OptionBtn0.PressedAfter += new SAPbouiCOM._IOptionBtnEvents_PressedAfterEventHandler(this.OptionBtn0_PressedAfter);
     this.OptionBtn1               = ((SAPbouiCOM.OptionBtn)(this.GetItem("op_appr").Specific));
     this.OptionBtn1.PressedAfter += new SAPbouiCOM._IOptionBtnEvents_PressedAfterEventHandler(this.OptionBtn1_PressedAfter);
     this.OptionBtn2               = ((SAPbouiCOM.OptionBtn)(this.GetItem("op_rej").Specific));
     this.OptionBtn2.PressedAfter += new SAPbouiCOM._IOptionBtnEvents_PressedAfterEventHandler(this.OptionBtn2_PressedAfter);
     this.OptionBtn3               = ((SAPbouiCOM.OptionBtn)(this.GetItem("op_sa").Specific));
     this.OptionBtn3.PressedAfter += new SAPbouiCOM._IOptionBtnEvents_PressedAfterEventHandler(this.OptionBtn3_PressedAfter);
     this.OnCustomInitialize();
 }
示例#5
0
 public override void OnInitializeComponent()
 {
     this.StaticText0              = ((SAPbouiCOM.StaticText)(this.GetItem("Item_0").Specific));
     this.Grid0                    = ((SAPbouiCOM.Grid)(this.GetItem("grd_lst").Specific));
     this.Grid0.PressedAfter      += new SAPbouiCOM._IGridEvents_PressedAfterEventHandler(this.Grid0_PressedAfter);
     this.OptionBtn0               = ((SAPbouiCOM.OptionBtn)(this.GetItem("op_cur").Specific));
     this.OptionBtn0.PressedAfter += new SAPbouiCOM._IOptionBtnEvents_PressedAfterEventHandler(this.OptionBtn0_PressedAfter);
     this.OptionBtn1               = ((SAPbouiCOM.OptionBtn)(this.GetItem("op_appr").Specific));
     this.OptionBtn1.PressedAfter += new SAPbouiCOM._IOptionBtnEvents_PressedAfterEventHandler(this.OptionBtn1_PressedAfter);
     this.OptionBtn2               = ((SAPbouiCOM.OptionBtn)(this.GetItem("op_rej").Specific));
     this.OptionBtn2.PressedAfter += new SAPbouiCOM._IOptionBtnEvents_PressedAfterEventHandler(this.OptionBtn2_PressedAfter);
     this.OptionBtn3               = ((SAPbouiCOM.OptionBtn)(this.GetItem("op_all").Specific));
     this.OptionBtn3.PressedAfter += new SAPbouiCOM._IOptionBtnEvents_PressedAfterEventHandler(this.OptionBtn3_PressedAfter);
     this.Grid1                    = ((SAPbouiCOM.Grid)(this.GetItem("grd_pro").Specific));
     this.Grid2                    = ((SAPbouiCOM.Grid)(this.GetItem("grd_info").Specific));
     this.StaticText1              = ((SAPbouiCOM.StaticText)(this.GetItem("Item_8").Specific));
     this.EditText0                = ((SAPbouiCOM.EditText)(this.GetItem("txt_comm").Specific));
     this.Button0                  = ((SAPbouiCOM.Button)(this.GetItem("bt_appr").Specific));
     this.Button0.PressedAfter    += new SAPbouiCOM._IButtonEvents_PressedAfterEventHandler(this.Button0_PressedAfter);
     this.Button1                  = ((SAPbouiCOM.Button)(this.GetItem("bt_rej").Specific));
     this.Button1.PressedAfter    += new SAPbouiCOM._IButtonEvents_PressedAfterEventHandler(this.Button1_PressedAfter);
     this.ResizeAfter             += new SAPbouiCOM.Framework.FormBase.ResizeAfterHandler(this.Form_ResizeAfter);
     this.OnCustomInitialize();
 }
示例#6
0
        public MeuFormGrid()
        {
            AppHelper.SetApplication(ref this.oApplication);

            this.oForm = UIHelper.CriarForm(this.oApplication, SAPbouiCOM.BoFormBorderStyle.fbs_Sizable, "SAMPLE", "frmGrid", 0, 0, true, 0, "Exemplo de Grid UIAPI", 305, 650);
            this.oForm.Freeze(true);


            this.oStaticHeader = UIHelper.AddStaticTextAoFormulario(this.oForm, "StatHeader"
                                                                    , 20, 500, 20, 0, "Em um novo grid você pode definir que os dados sejam agrupados e tenham uma árvore de colapso ");

            this.oStaticHead = UIHelper.AddStaticTextAoFormulario(this.oForm, "StatHead"
                                                                  , 20, 500, 40, 0, "Neste grid você poderá ver todas as notas fiscias de venda Cadastradas");

            this.oBtnCo  = UIHelper.AddBotaoAoFormulario(this.oForm, "btnCol", 480, 0, 80, 0, "Collapse", false);
            this.oBtnExp = UIHelper.AddBotaoAoFormulario(this.oForm, "btnExp", 480, 0, 110, 0, "Expand", false);

            this.oStaticGroup = UIHelper.AddStaticTextAoFormulario(this.oForm, "StatGroup"
                                                                   , 470, 80, 140, 0, "Agrupado ");

            userDS = UserDataSourceHelper.AddUserDataSource(this.oForm, "OpBtnDS", SAPbouiCOM.BoDataType.dt_SHORT_TEXT, 1);

            this.oOptNoGroup = UIHelper.AddOptionButtonAoFormulario(
                this.oForm
                , "optNo"
                , 480
                , 120
                , 160
                , 0
                , "Sem Agrupamento"
                , ""
                , true
                , 0
                , 0
                );

            this.oOptNoGroup.DataBind.SetBound(true, "", "OpBtnDS");

            this.oOptCardCode = UIHelper.AddOptionButtonAoFormulario(
                this.oForm
                , "optCode"
                , 480
                , 120
                , 180
                , 0
                , "Código do Cliente"
                , "optNo"
                , true
                , 0
                , 0
                );

            this.oOptCardCode.DataBind.SetBound(true, "", "OpBtnDS");

            this.oOptDocDate = UIHelper.AddOptionButtonAoFormulario(
                this.oForm
                , "optDate"
                , 480
                , 120
                , 200
                , 0
                , " Data do Documento"
                , "optNo"
                , true
                , 0
                , 0
                );

            this.oOptDocDate.DataBind.SetBound(true, "", "OpBtnDS");


            this.oOptDocStatus = UIHelper.AddOptionButtonAoFormulario(
                this.oForm
                , "optStatus"
                , 480
                , 120
                , 220
                , 0
                , " Status do Documento"
                , "optNo"
                , true
                , 0
                , 0
                );

            this.oOptDocStatus.DataBind.SetBound(true, "", "OpBtnDS");
            oItem        = oForm.Items.Add("MyGrid", SAPbouiCOM.BoFormItemTypes.it_GRID);
            oItem.Left   = 20;
            oItem.Top    = 60;
            oItem.Width  = 430;
            oItem.Height = 200;

            oGrid = ((SAPbouiCOM.Grid)(oItem.Specific));

            oForm.DataSources.DataTables.Add("MyDataTable");
            oForm.DataSources.DataTables.Item(0).ExecuteQuery("select CardCode, DocDate, DocNum, DocTotal, DocStatus from OINV");
            oGrid.DataTable = oForm.DataSources.DataTables.Item("MyDataTable");

            oGrid.Columns.Item(0).Width = 50;
            oGrid.Columns.Item(1).Width = 60;
            oGrid.Columns.Item(2).Width = 130;
            for (int i = 0; i < oGrid.Columns.Count; i++)
            {
                oGrid.Columns.Item(1).Editable = false;
            }

            AtualizarTiposColunas();

            ColorirLinhas();

            this.oForm.Visible = true;

            this.oApplication.ItemEvent += OApplication_ItemEvent;
            this.oForm.Freeze(false);
        }
示例#7
0
        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);
            }
        }