private void button1_Click(object sender, EventArgs e)
        {
            this.Hide();
            AllProducts prod = new AllProducts();

            prod.Show();
        }
示例#2
0
        private void submit_Click(object sender, EventArgs e)
        {
            DataClasses1DataContext context = new DataClasses1DataContext();

            if (context.CUSTOMERs.Any(c => c.Cust_User == userName.Text && c.Cust_Password == password.Text))
            {
                Id = context.CUSTOMERs.Where(c => c.Cust_User == userName.Text && c.Cust_Password == password.Text)
                     .Select(c => c.Cust_ID).First();
                //bring user to next page
                AllProducts prod = new AllProducts();
                prod.Show();
            }

            else
            {
                MessageBox.Show("you are not a user...");
                CreateAccnt accnt = new CreateAccnt();
                accnt.Show();
            }
        }