public CreditPaymentsWindow() { InitializeComponent(); CustomerPaymentSource = new ObservableCollection <CustomerPayment>(CustomerPayment.GetCustomerPayments()); Console.WriteLine(CustomerPaymentSource.Count); dataGrid.ItemsSource = CustomerPaymentSource; CustomerComboBox.ItemsSource = Customer.GetCustomers(); }
private void ReloadDataGrid() { // string text; /*= SearchTextBox.Text == DefaultText ? "" : SearchTextBox.Text;*/ // var selectionId = dataGrid.SelectedIndex; CustomerPaymentSource.Clear(); foreach (var CustomerPayment in CustomerPayment.GetCustomerPayments(customerId:_selectedcuCustomer.Id.ToString())) { CustomerPaymentSource.Add(CustomerPayment); } }
public void Test_GetCustomerPayment() { Assert.IsTrue(CustomerPayment.GetCustomerPayments().Any()); }