Exemple #1
0
 public static V2.DocumentDetailData ToV2(V1.DocDetailInfo docDetail)
 {
     V2.DocumentDetailData result = new V2.DocumentDetailData();
     result.ItemID          = docDetail.ItemID;
     result.ItemDescription = docDetail.ItemDescription;
     result.ItemName        = docDetail.ItemName;
     result.Price           = docDetail.Price;
     result.Quantity        = docDetail.Quantity;
     result.IsTaxable       = docDetail.IsTaxable;
     return(result);
 }
Exemple #2
0
        private void FillDocumentData(V2.ProcessingInput processingInput)
        {
            processingInput.DocumentData.DocumentDetails = new List <V2.DocumentDetailData>();
            V1.IDocDetailsDataReader documentReader = _provider.GetDocDetailsDataReader();
            List <V1.DocDetailInfo>  detailsData    = new List <V1.DocDetailInfo>();

            documentReader.ReadData(detailsData);
            foreach (var item in detailsData)
            {
                V2.DocumentDetailData v2Item = ToV2(item);
                processingInput.DocumentData.DocumentDetails.Add(v2Item);
            }
        }