private void btn_sub_Click(object sender, EventArgs e)
        {
            this.Hide();
            MakePurchase pg = new MakePurchase();

            pg.ShowDialog();
        }
Exemple #2
0
        private void btn_go_Click(object sender, EventArgs e)
        {
            //DataClasses1DataContext db1 = new DataClasses1DataContext();

            using (DataClasses1DataContext db = new DataClasses1DataContext())
            {
                var option = "";
                option = Convert.ToString(options.SelectedItem);

                switch (option)
                {
                case "Make Purchase":
                    this.Hide();
                    MakePurchase page = new MakePurchase();
                    page.ShowDialog();
                    break;

                case "View Store Items":
                    this.Hide();
                    ViewStoreItems page2 = new ViewStoreItems();
                    page2.ShowDialog();
                    break;

                case "View Account Detail":
                    this.Hide();
                    AccountDetail page1 = new AccountDetail();
                    page1.ShowDialog();
                    break;

                case "View Past Purchases":
                    this.Hide();
                    PastPurchases page3 = new PastPurchases();
                    page3.ShowDialog();

                    break;

                default: MessageBox.Show("Invalid Option");
                    break;
                }



                db.Dispose();
            }
        }