private List <ProductModel> GetSelectedProducts()
 {
     return(Products.Where(t => SelectedProductIds.Contains(t.Id)).ToList());
 }
        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;
        }
 //when custom package is selected
 public void ClearProductSelection()
 {
     SelectedPackage = null;
     SelectedProductIds.Clear();
     SelectedRentalItemTypes.Clear();
 }
 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)));
 }
 public bool IsSelected(int productId)
 {
     return(ImportAll || (SelectedProductIds != null && SelectedProductIds.ContainsKey(productId)));
 }