Esempio n. 1
0
        private void back_Click(object sender, EventArgs e)
        {
            Admin_Panel M = new Admin_Panel();

            M.Show();
            this.Hide();
        }
Esempio n. 2
0
 private void back_Click(object sender, EventArgs e)
 {
     if (this.prof == "Manager")
     {
         ManagerPanel m = new ManagerPanel(ps);
         m.Show();
         this.Dispose();
     }
     else if (this.prof == "Admin")
     {
         Admin_Panel A = new Admin_Panel(ps);
         A.Show();
         this.Dispose();
     }
 }
Esempio n. 3
0
        private void Log1_Click(object sender, EventArgs e)
        {
            string s   = textBox1.Text;
            string s2  = textBox2.Text;
            var    str = from a2 in cntx.Peoples
                         where a2.UserName == s && a2.password == s2

                         select a2;
            People pa = str.First();

            s2 = pa.password.ToString();
            string s3 = pa.UserType.ToString();


            if (s.Equals(textBox1.Text) && s2.Equals(textBox2.Text) && s3.Equals("Customer"))
            {
                UserPanel U = new UserPanel(s);
                U.Show();
                this.Hide();
            }

            else if (s.Equals(textBox1.Text) && s2.Equals(textBox2.Text) && s3.Equals("Manager"))
            {
                ManagerPanel U = new ManagerPanel(s);
                U.Show();
                this.Hide();
            }

            else if (s.Equals(textBox1.Text) && s2.Equals(textBox2.Text) && s3.Equals("Admin"))
            {
                Admin_Panel U = new Admin_Panel(s);
                U.Show();
                this.Hide();
            }
            else
            {
                MessageBox.Show("Invalid input");
            }
        }