Beispiel #1
0
        private void Button_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            var invoice = new InvoiceView(_id);

            try
            {
                invoice.ShowDialog();
            }
            catch (Exception exception)
            {
                System.Windows.MessageBox.Show(exception.ToString());
            }
        }
        private void FakturyAddMenuItem_Click(object sender, RoutedEventArgs e)
        {
            var db = new DataBase();

            db.InsertInvoice("new", 0, " ", " ", " ", " ", " ", " ", " ", " ", DateTime.Today, DateTime.Today, DateTime.Today, " ", " ", 1, " ", 0f, 0f, 0, 0f, " ", " ", 1f, " ", " ");
            try
            {
                var did = db.SelectInvoiceId("new");
                int.TryParse(did.Rows[0]["InvoiceID"].ToString(), out var invoiceIdResult);
                int _id     = invoiceIdResult;
                var invoice = new InvoiceView(_id);
                invoice.ShowDialog();
            }
            catch (Exception exception)
            {
                Console.WriteLine(exception);
            }


            // MessageBox.Show(this._id.ToString());
        }