public frmGoodIssue(int pIntRiseId, SAPbouiCOM.DataTable pDTTotalsConsumed) { mDTTotalsConsumed = pDTTotalsConsumed; mIntRiseId = pIntRiseId; LoadEvents(); LoadInitialsControls(); mLstItems = mObjMachineryServiceFactory.GetGoodIssuesService().GetItemsByRiseId(mIntRiseId); mStrUserCostCenter = mObjMachineryServiceFactory.GetUsersService().GetCostCenter( mObjMachineryServiceFactory .GetUsersService() .GetUserId(Application.SBO_Application.Company.UserName).ToString()); if (string.IsNullOrEmpty(mStrUserCostCenter)) { UIApplication.ShowError(string.Format("El usuario {0} no tiene asignado el centro de costo", Application.SBO_Application.Company.UserName)); this.UIAPIRawForm.Close(); } }
public frmTravelExpenses(int pIntRiseFolio, string pStrSupervisorCode, string pStrSupervisorName, int pIntDaysTotal, SAPbouiCOM.DataTable pDtEmployees, bool pBolIsFirstTravExp) { mObjMachinerySeviceFactory = new MachinerySeviceFactory(); LoadEvents(); mIntRiseFolio = pIntRiseFolio; mStrSupervisorCode = pStrSupervisorCode; mStrSupervisorName = pStrSupervisorName; mDtEmployees = pDtEmployees; mIntDaysTotal = pIntDaysTotal; mBolIsFirstTravExp = pBolIsFirstTravExp; mStrCostCenter = mObjMachinerySeviceFactory.GetUsersService().GetUserCenterCost(Application.SBO_Application.Company.UserName); mStrViaticExpAcct = mObjMachinerySeviceFactory.GetConfigurationsService().GetAccountCode(ConfigurationsEnum.ViaticExpenses); mStrExpDayAcct = mObjMachinerySeviceFactory.GetConfigurationsService().GetAccountCode(ConfigurationsEnum.DayExpenses); mStrMinorPurchAcct = mObjMachinerySeviceFactory.GetConfigurationsService().GetAccountCode(ConfigurationsEnum.MinorExpenses); mStrViaticPaymAcct = mObjMachinerySeviceFactory.GetConfigurationsService().GetAccountCode(ConfigurationsEnum.DeudoresViaticos); mDblViaticPrice = double.Parse(mObjMachinerySeviceFactory.GetConfigurationsService().GetConfigurationByName(ConfigurationsEnum.ViaticPrice).Value); mDblExpDayPrice = double.Parse(mObjMachinerySeviceFactory.GetConfigurationsService().GetConfigurationByName(ConfigurationsEnum.DayExpensesPrice).Value); LoadInitialsControls(); }