public IHttpActionResult GetPriceLists()
        {
            var priceLists = _pricingService.GetPriceLists();
            var result     = priceLists.Select(x => x.ToWebModel()).ToArray();

            return(Ok(result));
        }
Ejemplo n.º 2
0
 private BackupObject GetBackupObject()
 {
     return(new BackupObject
     {
         Pricelists = _pricingService.GetPriceLists().Select(x => x.Id).Select(x => _pricingService.GetPricelistById(x)).ToArray()
     });
 }
Ejemplo n.º 3
0
        private BackupObject GetBackupObject(Action <ExportImportProgressInfo> progressCallback)
        {
            var allPricelistIds = _pricingService.GetPriceLists().Select(x => x.Id);
            var progressInfo    = new ExportImportProgressInfo {
                Description = String.Format("{0} price lists loading...", allPricelistIds.Count())
            };

            progressCallback(progressInfo);
            return(new BackupObject
            {
                Pricelists = allPricelistIds.Select(x => _pricingService.GetPricelistById(x)).ToList()
            });
        }