public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { ActiveInventoryObject item = value as ActiveInventoryObject; if (item != null) { decimal retVal = item.GetTotalPrice(PricingModelObject.GetPricingModel(Configuration.Current.CurrentPricingModel)) * item.Quantity; return(retVal.ToString("C", System.Globalization.CultureInfo.CurrentUICulture)); } else { return(null); } }
private void OnDelete(object sender, RoutedEventArgs e) { Button btn = sender as Button; if (btn != null) { PricingModelObject pmo = btn.CommandParameter as PricingModelObject; if (pmo != null) { if (Models.Contains(pmo)) { Models.Remove(pmo); } } } }
public PointOfSale() { Activity = new ObservableCollection <ActiveInventoryObject>(); PricingModels = PricingModelObject.Models; SelectedPricingModel = PricingModelObject.GetPricingModel(Configuration.Current.CurrentPricingModel); ReceiptID = Configuration.BuildReceiptID(); foreach (FinancialObject fo in Cache.Current.CurrentFinancials) { TotalCashSales += fo.TotalCash; TotalCreditSales += fo.TotalCredit; TotalCheckSales += fo.TotalCheck; TotalProfit += fo.ProfitLoss; TotalTaxesAssesed += fo.TotalTax; } USState = Configuration.Current.LastUSState; InitializeComponent(); }
private void OnSave(object sender, RoutedEventArgs e) { PricingModelObject.Save(); }