Example #1
0
        private void PaymentListBox_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            var r = this.PaymentListBox.SelectedItem as PaymentRecord;
            var w = new EditRecordWindow(r);

            w.ShowDialog();

            if (w.Deleted == true)
            {
                this._PaymentList.Remove(r);
            }
        }
Example #2
0
        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;
        }