Ejemplo n.º 1
0
        private void CancelMaga(object sender, RoutedEventArgs e)
        {
            MainUIWindow main = new MainUIWindow(role, cusID);

            main.Show();
            Close();
        }
Ejemplo n.º 2
0
        private void Button_Click_2(object sender, RoutedEventArgs e)
        {
            MainUIWindow main = new MainUIWindow(this.role, this.CusID);

            main.Show();
            Close();
        }
Ejemplo n.º 3
0
 private void button1_Click(object sender, RoutedEventArgs e)
 {
     if (!bllLogin.checkEmailLength(textBoxEmail.Text))
     {
         errormessage.Text = "";
         errormessage.Text = "Enter an email!";
         textBoxEmail.Focus();
     }
     else if (!bllLogin.checkEmailStyle(textBoxEmail.Text))
     {
         errormessage.Text = "";
         errormessage.Text = "Enter a valid email.";
         textBoxEmail.Select(0, textBoxEmail.Text.Length);
         textBoxEmail.Focus();
     }
     else
     {
         if (!bllLogin.checkSelect(textBoxEmail.Text, passwordBox1.Password))
         {
             errormessage.Text = "Sorry! Please enter existing email/password!";
         }
         else
         {
             DataSet dataSet     = bllLogin.checkInfo(textBoxEmail.Text, passwordBox1.Password);
             string  role        = dataSet.Tables[0].Rows[0]["Role"].ToString();
             string  username    = "******" + dataSet.Tables[0].Rows[0]["Username"].ToString();
             var     customer_ID = dataSet.Tables[0].Rows[0]["Customer_ID"];
             //MessageBox.Show(customer_ID.ToString());
             //welcome.TextBlockCusID.Text = customer_ID;//Sending value from one form to another form.
             //welcome.TextBlockUsername.Text = username;//Sending value from one form to another form.
             //welcome.TextBlockRole.Text = role;//Sending value from one form to another form.
             MainUIWindow main = new MainUIWindow(role, (int)customer_ID);
             main.Show();
             Close();
         }
     }
 }