public AllPayments PaytablesConverter(dynamic Paytables) { if (Paytables != null) { if (Paytables.Count > 0) { foreach (var item in Paytables) { _payinfo.Add(new Payments(item.NumberPayment, item.DateTime, item.BodyCredit, item.InterestCoverage, item.CreditAmount, item.Overpayment)); } } } return(_payinfo); }
private void NewPayment(object obj) { IPayment newPayment = new Payment(); _bon.Payments.Add(newPayment); PaymentViewModel zahlungWrapper = new PaymentViewModel(newPayment, _DBConnection); zahlungWrapper.PropertyChanged -= dingsda; zahlungWrapper.PropertyChanged += dingsda; AllPayments.Add(zahlungWrapper); CurrentPayment = zahlungWrapper; RaisePropertyChanged("CurrentPayment"); RaisePropertyChanged("SumToPay"); RaisePropertyChanged("PaymentsExist"); }
private void Loaded() { EditCommand = null; AllPayments.Clear(); foreach (var payment in paymentRepository.LoadRecurringList()) { AllPayments.Add(payment); } Source = new ObservableCollection <AlphaGroupListGroup <Payment> >( AlphaGroupListGroup <Payment> .CreateGroups(AllPayments, CultureInfo.CurrentUICulture, s => s.ChargedAccount.Name)); //We have to set the command here to ensure that the selection changed event is triggered earlier EditCommand = new MvxCommand <Payment>(Edit); }