//public static void Send2Excel(IEnumerable<SaleReportLine> slst)
        //{
        //    if (slst == null) return;
        //    var s = new ExportToExcel<SaleReportLine, List<SaleReportLine>>();
        //    s.dataToPrint = slst.ToList();
        //    s.GenerateReport();
        //}



        public async Task <IEnumerable <AsycudaDocument> > GetSalesDocuments(int docSetId)
        {
            List <int> doclst;

            using (var ctx = new DocumentDSContext())
            {
                doclst =
                    ctx.xcuda_ASYCUDA_ExtendedProperties.Where(x => x.AsycudaDocumentSetId == docSetId)
                    .Select(x => x.ASYCUDA_Id).ToList();
            }
            foreach (var d in doclst)
            {
                await AsycudaEntrySummaryListModel.ReorderDocumentItems(d).ConfigureAwait(false);
            }


            using (var ctx = new AsycudaDocumentService())
            {
                var lst =

                    (await
                     ctx.GetAsycudaDocumentsByExpression(
                         string.Format("AsycudaDocumentSetId == {0} && DoNotAllocate != true && (DocumentType.Contains(\"EX\") || DocumentType == \"IM4\")", docSetId),
                         null
                         ).ConfigureAwait(false));



                return(lst);
            }
        }
Exemple #2
0
 static AsycudaEntrySummaryListModel()
 {
     instance = new AsycudaEntrySummaryListModel();
 }