示例#1
0
        private void PrevButton_Click(object sender, RoutedEventArgs e)
        {
            MenuWindow menuWindow = new MenuWindow();

            menuWindow.Show();
            this.Close();
        }
示例#2
0
        public MainWindow()
        {
            InitializeComponent();

            MenuWindow menuWindow = new MenuWindow();

            menuWindow.Show();
            this.Close();
        }
示例#3
0
 private void prevPageBtn_Click(object sender, RoutedEventArgs e)
 {
     if (SQLiteDataAccess.LoadUsers().Count() != 0)
     {
         MenuWindow menuWindow = new MenuWindow();
         menuWindow.Show();
         this.Close();
     }
 }
示例#4
0
        private void updateBtn_Click(object sender, RoutedEventArgs e)
        {
            Customer c = new Customer(fnameBox.Text, lnameBox.Text, emailBox.Text);

            SQLiteDataAccess.SaveCustomer(c);

            MenuWindow menuWindow = new MenuWindow();

            menuWindow.Show();
            this.Close();
        }
        private void ReminderButton_Click(object sender, RoutedEventArgs e)
        {
            EmailManager emailManager = new EmailManager(cust);

            emailManager.SendReminder();

            MessageBox.Show("Payment reminder sent.");

            MenuWindow menuWindow = new MenuWindow();

            menuWindow.Show();
            this.Close();
        }
        private void UpdateButton_Click(object sender, RoutedEventArgs e)
        {
            cust.Last_Name  = LNameBox.Text;
            cust.First_Name = FNameBox.Text;
            cust.Email      = EmailBox.Text;
            SQLiteDataAccess.updateCustomer(cust);

            MessageBox.Show("Customer info updated.");

            MenuWindow menuWindow = new MenuWindow();

            menuWindow.Show();
            this.Close();
        }
        private void DeleteButton_Click(object sender, RoutedEventArgs e)
        {
            SQLiteDataAccess.deleteCustomer(cust);
            foreach (Order o in orders)
            {
                SQLiteDataAccess.deleteOrderDetailsByOrderID(o.Order_ID);
                SQLiteDataAccess.deleteOrder(o.Order_ID);
            }
            MessageBox.Show("Customer info deleted.");

            MenuWindow menuWindow = new MenuWindow();

            menuWindow.Show();
            this.Close();
        }