public string GetDataToSign() { return(ExternalUniqueNumber.Length + ExternalUniqueNumber + Total.ToString().Length + Total.ToString() + ItemsQuantity.ToString().Length + ItemsQuantity.ToString() + IssuedAt.ToString().Length + IssuedAt.ToString() + CallbackUrl.Length + CallbackUrl); }
public void ExecuteFilterReservationsViewCommand() { if (ItemsQuantity != null) { ItemsQuantity = new ObservableCollection <ItemQuantityDTO>( ItemsQuantity.Where(iq => iq.QuantityReserved > 0).ToList()); } }
private void SetSummary() { TotalNumberOfItemQuantityTypes = ItemsQuantity.Count; TotalNumberOfItemsQuantity = ItemsQuantity.Sum(iq => iq != null ? iq.QuantityOnHand : 0).ToString("N0"); TotalValueOfItemsQuantity = ItemsQuantity.Sum(iq => iq != null ? iq.TotalPrice : 0).ToString("C"); TotalPurchaseValueOfItemsQuantity = ItemsQuantity.Sum(iq => iq != null ? iq.TotalPurchasePrice : 0).ToString("C"); ProfitOfItemsQuantity = (ItemsQuantity.Sum(iq => iq != null ? iq.TotalPrice : 0) - ItemsQuantity.Sum(iq => iq != null ? iq.TotalPurchasePrice : 0)).ToString("C"); }
public void ExecuteFilterByQuantityViewCommand() { int filterQty; decimal purchasePrice, salePrice; if (ItemQuantityList != null) { ItemsQuantity = new ObservableCollection <ItemQuantityDTO>(ItemQuantityList.ToList()); } else { return; } if (SelectedQuantity != null && int.TryParse(FilterQuantity.ToString(), out filterQty)) { switch (SelectedQuantity.Value) { #region Filter By Qty case 0: break; case 1: ItemsQuantity = new ObservableCollection <ItemQuantityDTO>( ItemsQuantity.Where(iq => iq.QuantityOnHand > filterQty).ToList()); break; case 2: ItemsQuantity = new ObservableCollection <ItemQuantityDTO>( ItemsQuantity.Where(iq => iq.QuantityOnHand < filterQty).ToList()); break; case 3: ItemsQuantity = new ObservableCollection <ItemQuantityDTO>( ItemsQuantity.Where(iq => iq.QuantityOnHand == filterQty).ToList()); break; case 4: ItemsQuantity = new ObservableCollection <ItemQuantityDTO>( ItemsQuantity.Where(iq => iq.QuantityOnHand >= iq.Item.SafeQuantity).ToList()); break; case 5: ItemsQuantity = new ObservableCollection <ItemQuantityDTO>( ItemsQuantity.Where(iq => iq.QuantityOnHand <= iq.Item.SafeQuantity).ToList()); break; case 6: ItemsQuantity = new ObservableCollection <ItemQuantityDTO>( ItemsQuantity.Where(iq => iq.QuantityOnHand == iq.Item.SafeQuantity).ToList()); break; #endregion } } if (SelectedPurchasePrice != null && decimal.TryParse(FilterPurchasePrice.ToString(), out purchasePrice)) { switch (SelectedPurchasePrice.Value) { #region Filter By Purchase Price case 0: break; case 1: ItemsQuantity = new ObservableCollection <ItemQuantityDTO>( ItemsQuantity.Where(iq => iq.Item.PurchasePrice > purchasePrice).ToList()); break; case 2: ItemsQuantity = new ObservableCollection <ItemQuantityDTO>( ItemsQuantity.Where(iq => iq.Item.PurchasePrice < purchasePrice).ToList()); break; case 3: ItemsQuantity = new ObservableCollection <ItemQuantityDTO>( ItemsQuantity.Where(iq => iq.Item.PurchasePrice == purchasePrice).ToList()); break; #endregion } } if (SelectedSalePrice != null && decimal.TryParse(FilterSalePrice.ToString(), out salePrice)) { switch (SelectedSalePrice.Value) { #region Filter By Sale Price case 0: break; case 1: ItemsQuantity = new ObservableCollection <ItemQuantityDTO>( ItemsQuantity.Where(iq => iq.Item.SalePrice > salePrice).ToList()); break; case 2: ItemsQuantity = new ObservableCollection <ItemQuantityDTO>( ItemsQuantity.Where(iq => iq.Item.SalePrice < salePrice).ToList()); break; case 3: ItemsQuantity = new ObservableCollection <ItemQuantityDTO>( ItemsQuantity.Where(iq => iq.Item.SalePrice == salePrice).ToList()); break; #endregion } } }