private void LoadFolios() { try { this.UIAPIRawForm.Freeze(true); Application.SBO_Application.StatusBar.SetText("Buscando folios...", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Warning); ClearMatrix(); //FillDataSource(pStrDate1, pStrDate2); this.UIAPIRawForm.DataSources.DataTables.Item("DT_Fol").ExecuteQuery(mObjTransportServiceFactory.GetCommissionDriverService().GetCmsFoliosQuery()); mtxFolios.AutoResizeColumns(); mtxFolios.Columns.Item("ColFolio").DataBind.Bind("DT_Fol", "U_Folio"); mtxFolios.Columns.Item("ColClient").DataBind.Bind("DT_Fol", "U_Amount"); //mtxFolios.Columns.Item("ColEst").DataBind.Bind("DT_Fol", "Estatus"); mtxFolios.LoadFromDataSource(); } catch (Exception lObjException) { LogUtility.WriteError(String.Format("[frmCFLFolios - LoadFolios] Error: {0}", lObjException.Message)); SAPbouiCOM.Framework.Application.SBO_Application.MessageBox(string.Format("Error al obtener los folios: {0}", lObjException.Message)); } finally { this.UIAPIRawForm.Freeze(false); } }
public void LoadCommissionDetails(string pStrFolio) { try { this.UIAPIRawForm.Freeze(true); if (string.IsNullOrEmpty(pStrFolio)) { UIApplication.ShowError("Seleccione un folio de comisión"); return; } string lStrCmsDriverAcct = new QueryManager().GetValue("U_VALUE", "Name", "TR_ACC_LIQCHOF", "[@UG_Config]"); if (string.IsNullOrEmpty(lStrCmsDriverAcct)) { UIApplication.ShowError("Agregue un valor en la configuración para el campo TR_ACC_LIQCHOF"); return; } ClearMatrix("DTCom", mtxCommissions); IList <CommissionDriverDetailsDTO> lLstCommissionDetails = mObjTransportServiceFactory.GetCommissionDriverService().GetCommissionDriversDetails(pStrFolio, lStrCmsDriverAcct); foreach (var lObjCommission in lLstCommissionDetails) { AddRiseCommissionDetail(lObjCommission); } } catch (Exception lObjException) { LogUtility.WriteError(string.Format("[frmDriversCommissions - LoadCommissionDetails] Error: {0}", lObjException.Message)); } finally { this.UIAPIRawForm.Freeze(false); } }