private void GetItemsDetails(string pStrRiseId) { try { this.UIAPIRawForm.Freeze(true); if (string.IsNullOrEmpty(pStrRiseId)) { UIApplication.ShowMessageBox("Seleccione una subida"); return; } ClearMatrix(dtItems.UniqueID, mtxItems); List <InventoryItemsLinesDTO> lLstRiseItems = mObjMachineryServiceFactory.GetGoodIssuesService().GetRiseItemsForStockTransfer(int.Parse(pStrRiseId)); foreach (var lObjRiseItem in lLstRiseItems.Where(x => x.Category != "Unk" && x.Quantity > 0)) { AddRiseItemDetails(lObjRiseItem); } } catch (Exception lObjException) { LogUtility.WriteError(string.Format("[frmStockTransfer - GetItemsDetails] Error: {0}", lObjException.Message)); UIApplication.ShowMessageBox(lObjException.Message); } finally { this.UIAPIRawForm.Freeze(false); } }
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(); } }