private void btnMoneyIn_Click(object sender, EventArgs e)
        {
            myDatabase1.FindCustomerByEmail(txtMail.Text).moneyIn(Convert.ToDouble(txtAmount.Text));
            myDatabase1.StoreCSVData(path);

            txtNewAccountBalance.Text = myDatabase1.FindCustomerByEmail(txtMail.Text).AccountBalance.ToString();
            txtAmount.Clear();
        }
Beispiel #2
0
        private void btnFindPersEmail_Click(object sender, EventArgs e)
        {
            try
            {
                Customer.CheckEmail(txtMail.Text);

                if (!myDatabase.IsEmailInDatabase(txtMail.Text))
                {
                    throw new ArgumentException("Customer Email not found");
                }

                Customer customer = myDatabase.FindCustomerByEmail(txtMail.Text);
                dataGridView2.Rows.Clear();
                dataGridView2.Rows.Add(
                    customer.CustomerID,
                    customer.FirstName,
                    customer.LastName,
                    customer.Email,
                    customer.AccountBalance,
                    customer.LastChange);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
                txtMail.Clear();
            }
        }
Beispiel #3
0
        private void btnFindPersEmail_Click(object sender, EventArgs e)
        {
            Customer customer = myDatabase.FindCustomerByEmail(txtMail.Text);

            dataGridView2.Rows.Clear();
            dataGridView2.Rows.Add(
                customer.CustomerID, customer.FirstName, customer.LastName, customer.Email, customer.AccountBalance, customer.LastChange
                );
        }