public static MCustomer MCustomerEmpty(this BoCustomer oBCustomer) { var lObject = LiUtilsLib.bll_GetObjectByName(MGlobalVariables.LNameObjectCustomer); var lMCustomer = new MCustomer { LObject = new MObject { LIdObject = lObject.LIdObject, LNameObject = lObject.LNameObject }, LStatus = new MStatus { LDsEstado = null, LIdStatus = null }, LTypeIdentification = new MTypeIdentification { LIdTypeIdentification = 0, LTypeIdentification = null }, LListTypeIdentification = new List <SelectListItem>(), LListStatus = new List <SelectListItem>(), LNameCustomer = null, LLastNameCustomer = null, LNoIdentification = null, LIdCustomer = 0, LCreationDate = new DateTime(), LModificationDate = new DateTime() }; lMCustomer.LListTypeIdentification = LiTypeIdentification.bll_getListTypeIdentification().MListAllTypeIdentificationWithSelect(true); lMCustomer.LListStatus = LiStatus.Bll_getListStatusByIdObject(lMCustomer.LObject.LIdObject).MListStatusWithSelect(); return(lMCustomer); }
public static MInventoryItem MInventoryEmpty(this int pIdInventory) { var obInventory = LInventoryTInventory.bll_GetInventoryById(pIdInventory); var oObject = LiUtilsLib.bll_GetObjectByName(MGlobalVariables.LNameObjectInventoryItem); var oMInventoryItem = new MInventoryItem { LStatus = new MStatus { LDsEstado = null, LIdStatus = null }, LListStatus = new List <SelectListItem>(), LProduct = new MProduct(), LListProduct = new List <SelectListItem>(), LInventory = new MInventory { LIdInventory = obInventory.LIdInventory, LNameInventory = obInventory.LNameInventory }, LQtySellable = 0, LQtyNonSellable = 0, LCreationDate = new DateTime(), LObject = new MObject { LIdObject = oObject.LIdObject, LNameObject = oObject.LNameObject } }; oMInventoryItem.LListStatus = LiStatus.Bll_getListStatusByIdObject(oMInventoryItem.LObject.LIdObject).MListStatusWithSelect(); oMInventoryItem.LListProduct = LiProduct.bll_GetAllProduct().MListAllProductwithSelect(); return(oMInventoryItem); }
public string bll_InsertListOrderItem(int pIdOrder, int pIdInventory, List <BoOrderItem> pListOrderItem, bool pIsInventory) { var lObject = LiUtilsLib.bll_GetObjectByName(EObjects.BoOrderItem); string lResult = null; pListOrderItem.ForEach(x => { var lOrderItem = new BoOrderItem { LObject = new BoObject { LIdObject = lObject.LIdObject }, LStatus = new BoStatus { LIdStatus = LiUtilsLib.bll_getStatusApproByObject(lObject.LIdObject).LIdStatus }, LProduct = new BoProduct { LCdProduct = x.LProduct.LCdProduct }, LOrder = new BoOrder { LIdOrder = pIdOrder }, LValueProduct = x.LValueProduct, LValueSupplier = x.LValueSupplier, LValueTaxes = x.LValueTaxes, LValueDesc = x.LValueDesc, LQty = x.LQty }; if (pIsInventory) { lResult = LItem.bll_SubstractInventoryItem(lOrderItem, pIdInventory); } if (!string.IsNullOrEmpty(lResult)) { return; } lResult = this.LiDaoOrderItem.Dao_InsertOrderItem(lOrderItem); }); return(lResult); }
public static MInventory MInventoryEmpty() { var oObject = LiUtilsLib.bll_GetObjectByName(MGlobalVariables.LNameObjectInventory); var lMInventory = new MInventory { LObject = new MObject { LIdObject = oObject.LIdObject, LNameObject = oObject.LNameObject }, LStatus = new MStatus { LDsEstado = null, LIdStatus = null }, LListStatus = new List <SelectListItem>(), LNameInventory = null, LCreationDate = new DateTime() }; lMInventory.LListStatus = LiStatus.Bll_getListStatusByIdObject(lMInventory.LObject.LIdObject).MListStatusWithSelect(); return(lMInventory); }
public static MProduct MProductEmpty(this BoProduct pBoProduct) { var lObject = LiUtilsLib.bll_GetObjectByName(MGlobalVariables.LNameObjectProduct); var lMProduct = new MProduct { LObject = new MObject { LIdObject = lObject.LIdObject, LNameObject = lObject.LNameObject }, LStatus = new MStatus { LDsEstado = null, LIdStatus = null }, LUnit = new MUnit(), LTaxe = new MTaxe(), LListUnit = new List <SelectListItem>(), LListStatus = new List <SelectListItem>(), LListSupplier = new List <SelectListItem>(), LListSelectTaxe = new List <SelectListItem>(), LListTaxe = new List <MTaxe>(), LNameProduct = null, LCdProduct = null, LValue = 0, LListIdsTaxe = null, LValueSupplier = 0, LCreationDate = new DateTime() }; lMProduct.LListStatus = LiStatus.Bll_getListStatusByIdObject(lMProduct.LObject.LIdObject).MListStatusWithSelect(); lMProduct.LListSupplier = LiSupplier.bll_GetAllSupplier().MListAllSupplierWithSelect(true); lMProduct.LListUnit = LiUtilsLib.bll_GetAllUnit().MListAllUnitWithSelect(); lMProduct.LListSelectTaxe = LiTaxe.bll_GetListTaxes().MListTaxesWithSelect(true); return(lMProduct); }