private void PrepareSummary() { var rentalItems = new List <RentalItemModel>(); rentalItems.AddRange(SelectedProps); if (SelectedBooth != null) { rentalItems.Add(SelectedBooth); } if (SelectedBackground != null) { rentalItems.Add(SelectedBackground); } OrderPreview = _orderFacade.PrepareOrderAsync(rentalItems, Products.Where(t => SelectedProductIds.Contains(t.Id)).ToList(), OrderBasicInfo).Result; }
private List <ProductModel> GetSelectedProducts() { return(Products.Where(t => SelectedProductIds.Contains(t.Id)).ToList()); }
public void SelectPackageBasedOnItemSelection() { SelectedPackage = Packages.FirstOrDefault(t => t.RentalItemTypes.Count == SelectedRentalItemTypes.Count && t.RentalItemTypes.All(s => SelectedRentalItemTypes.Contains(s)) && t.ProductIds.Count == SelectedProductIds.Count && t.ProductIds.All(s => SelectedProductIds.Contains(s))); }