private RemainClient2 CreateProxyEntity(RemainRow remainRow) { //*** map every field var remainProxy = new RemainClient2(); remainProxy.Id = remainRow.Guid; //*** id check remainProxy.ProductCode = long.Parse(remainRow.ProductCode); remainProxy.ProductName = remainProxy.ProductName; remainProxy.Store = remainRow.Store; remainProxy.StoreId = remainRow.StoreId; remainProxy.Seria = remainRow.Series; remainProxy.QuantityRem = remainRow.QuantityRem; remainProxy.ProgramName = remainRow.ProgramName; remainProxy.RetailVat = remainRow.RetailVat; remainProxy.RetailPrice = remainRow.RetailPrice; remainProxy.RetailPriceVat = remainRow.RetailPriceVat; remainProxy.ProducerVat = remainRow.ProducerVat; remainProxy.ProducerPrice = remainRow.ProducerPrice; remainProxy.ProducerPriceVat = remainRow.ProducerPriceVat; remainProxy.SupplierVat = remainRow.SupplierVat; remainProxy.SupplierPrice = remainRow.SupplierPrice; remainProxy.SupplierPriceVat = remainRow.SupplierPriceVat; return(remainProxy); }
private RemainClient2 EntityToProxy(RemainRow remainRow) { //*** map every field var remainProxy = new RemainClient2(); remainProxy.Id = remainRow.Guid; //*** check in guide remainProxy.ProductCode = long.Parse(remainRow.ProductCode); remainProxy.Store = remainRow.Store; remainProxy.StoreId = remainRow.StoreId; remainProxy.ProductName = remainRow.ProductName; remainProxy.Seria = remainRow.Series; remainProxy.QuantityRem = remainRow.QuantityRem; remainProxy.ProducerPrice = remainProxy.ProducerPrice; remainProxy.ProducerPriceVat = remainRow.ProducerPriceVat; remainProxy.ProducerVat = remainProxy.ProducerVat; remainProxy.SupplierVat = remainRow.SupplierVat; remainProxy.SupplierPrice = remainRow.SupplierPrice; remainProxy.ProducerPriceVat = remainRow.SupplierPriceVat; remainProxy.RetailVat = remainRow.RetailVat; remainProxy.RetailPrice = remainRow.RetailPrice; remainProxy.RetailPriceVat = remainRow.RetailPriceVat; remainProxy.ProgramName = remainRow.ProgramName; //remainRow.Unit; //remainProxy remainRow.Supplier; //remainRow.ContractorId; //remainRow.DrugstoreLotGuid; //remainRow.UnifyGuid; //remainRow.ContractItemGuid; //remainRow.DocumentType; //remainRow.DocumentId; //remainRow.DocumentNumber; //remainRow.DocumentItemId; //remainRow.DocumentDate; //remainRow.InvoiceDate; //remainRow.InvoiceNumber; //remainRow.Barcode; //remainRow.Numerator; //remainRow.Denominator; //remainRow.QuantityAdd; //remainRow.QuantitySub; //remainRow.QuantityRes; //remainRow.QuantityInvoice; //remainRow.QuantityReturnSupplier; //remainRow.InternalInvoiceDate; //remainRow.InternalInvoiceNumber; //remainRow.QuantityMovementAdd; //remainRow.QuantityMovementSub; return(remainProxy); }
// PROXY CLASS CREATION SECTION //------------------------------------------------- //*** create batch for multiline recipes private RemainClient2[] CreateProxyEntityList(IList <RemainRow> remainRowsList) { int proxyRemainsTotal = remainRowsList.Count; var proxyRemainsArr = new RemainClient2[proxyRemainsTotal]; for (int proxyRemainsCount = 0; proxyRemainsCount < proxyRemainsTotal; ++proxyRemainsCount) { proxyRemainsArr[proxyRemainsCount] = CreateProxyEntity(remainRowsList[proxyRemainsCount]); } return(proxyRemainsArr); }
// PRIVATE HELPER METHODS SECTION //--------------------------------------------------------------------- #region Private methods private RemainClient2[] CreateProxyRemainsCollection(IList <RemainRow> remainsRow) { int proxyRemainsTotal = remainsRow.Count; var proxyRemainsArr = new RemainClient2[proxyRemainsTotal]; for (int proxyRemainsCount = 0; proxyRemainsCount < proxyRemainsTotal; ++proxyRemainsCount) { proxyRemainsArr[proxyRemainsCount] = EntityToProxy(remainsRow[proxyRemainsCount]); } return(proxyRemainsArr); }