public void SendData() { _eventAggregator.PublishOnUIThread(new AddManyPaystubsEventModel(PaystubDataList.ToList(), AddToSelection.Code)); ClearInputFields(); PaystubDataList = new BindableCollection <Paystub>(); this.TryClose(null); }
public void Add() { Paystub temp = new Paystub() { Index = (uint)PaystubDataList.Count + 1 }; if (NameInput != null) { temp.Name = NameInput; } if (GrossInput != null) { temp.Gross = (decimal)GrossInput; } if (NetInput != null) { temp.Net = (decimal)NetInput; } PaystubDataList.Add(temp); ClearInputFields(); }
public void Handle(AddManyPaystubsEventModel message) { // Add New if (message.AddCode == 0) { PaystubDataList = new BindableCollection <Paystub>(message.PaystubDataList); } // Add To Front else if (message.AddCode == 1) { BindableCollection <Paystub> temp = new BindableCollection <Paystub>(message.PaystubDataList); temp.AddRange(this.PaystubDataList); PaystubDataList = temp; } else if (message.AddCode == 2) { PaystubDataList.AddRange(message.PaystubDataList); } }
public void CalculatePaystubs() { Tuple <List <Paystub>, Tuple <decimal, decimal, decimal>, Tuple <decimal, decimal> > calcOut = PaystubCalculator.BeginCalc( MessageManager.DisplayMessage, ConvertWarning, PaystubDataList.ToList(), (decimal)AccuracyInput ); Decision = PaystubCalculator.Decision; //Tuple 1 PaystubDataList = new BindableCollection <Paystub>(calcOut.Item1); // Tuple 2 AverageGross = calcOut.Item2.Item1; AverageNet = calcOut.Item2.Item2; AveragePercent = calcOut.Item2.Item3; // Tuple 3 PercentDifference = calcOut.Item3.Item1; CompletePaystubOut = calcOut.Item3.Item2; }
public void CalculatePercentages() { PaystubDataList = new BindableCollection <Paystub>(Paystub.GetPercentages(PaystubDataList.ToList())); }
public void RemovePaystub() { PaystubDataList.Remove(SelectedPaystub); }
public void AddPaystub() { PaystubDataList.Add(Paystub.Default((uint)PaystubDataList.Count)); }