private void GetPaymentList() { var db = new DbAccessDatabase.Database(); db.ConnectionString = File.ReadAllText("C:\\GitHub\\ConnectionString.txt"); foreach (var item in db.SelectPaymentRecords()) { this._PaymentList.Add(item); } this.PaymentListBox.ItemsSource = this._PaymentList; }
private void AddButton_Click(object sender, RoutedEventArgs e) { var w = new EditRecordWindow(); w.ShowDialog(); var db = new DbAccessDatabase.Database(); db.ConnectionString = File.ReadAllText("C:\\GitHub\\ConnectionString.txt"); var paymentList = db.SelectPaymentRecords(); this.PaymentListBox.ItemsSource = paymentList; }