Esempio n. 1
0
      private void buttonBack_MouseClick(object sender, MouseEventArgs e)
      {
          var q1 = from p in dbprofile.users
                   where p.UNAME.Contains(LoginUI.userlogged)
                   select p.UPRI;


          if (q1.First() == 1)
          {
              this.Hide();
              AdminPanelUI adm = new AdminPanelUI();
              adm.ShowDialog();
              this.Close();
          }
          else if (q1.First() == 2)
          {
              this.Hide();
              EmployeeUI adms = new EmployeeUI();
              adms.ShowDialog();
              this.Close();
          }
          else if (q1.First() == 3)
          {
              this.Hide();
              CustomerUI adms = new CustomerUI();
              adms.ShowDialog();
              this.Close();
          }
      }
Esempio n. 2
0
        private void buttonBack_MouseClick(object sender, MouseEventArgs e)
        {
            this.Hide();
            AdminPanelUI adm = new AdminPanelUI();

            adm.ShowDialog();
            this.Close();
        }
Esempio n. 3
0
        private void metroButton1_MouseClick(object sender, MouseEventArgs e)
        {
            this.Hide();
            AdminPanelUI asd = new AdminPanelUI();

            asd.ShowDialog();
            this.Close();
        }
Esempio n. 4
0
        private void Back_MouseClick(object sender, MouseEventArgs e)
        {
            this.Hide();
            AdminPanelUI ui = new AdminPanelUI();

            ui.ShowDialog();
            this.Close();
        }
Esempio n. 5
0
        private void metroButton1_MouseClick(object sender, MouseEventArgs e)
        {
            String username = metroTextBox1.Text;
            String password = metroTextBox2.Text;
            var    all      = from data in d.users select data;

            foreach (var result in all)
            {
                if (result.UNAME == username && result.UPWD == password && result.UPRI == 1)
                {
                    userlogged        = username;
                    checkloginsuccess = true;
                    this.Hide();
                    AdminPanelUI frms = new AdminPanelUI();
                    frms.ShowDialog();
                    this.Close();
                }

                else if (result.UNAME == username && result.UPWD == password && result.UPRI == 2)
                {
                    userlogged        = username;
                    checkloginsuccess = true;
                    this.Hide();
                    EmployeeUI frmss = new EmployeeUI();
                    frmss.ShowDialog();
                    this.Close();
                }
                else if (result.UNAME == username && result.UPWD == password && result.UPRI == 3)
                {
                    userlogged        = username;
                    checkloginsuccess = true;
                    this.Hide();
                    CustomerUI frmsss = new CustomerUI();
                    frmsss.ShowDialog();
                    this.Close();
                }
            }
            if (checkloginsuccess == false)
            {
                MessageBox.Show("USERNAME-PASSWORD NOT MATCHED!");
            }
        }
Esempio n. 6
0
        private void metroButton1_MouseClick(object sender, MouseEventArgs e)
        {
            var q1 = from p in dbc.users
                     where p.UNAME.Contains(LoginUI.userlogged)
                     select p.UPRI;


            if (q1.First() == 1)
            {
                this.Hide();
                AdminPanelUI adm = new AdminPanelUI();
                adm.ShowDialog();
                this.Close();
                //break;
            }
            else if (q1.First() == 2)
            {
                this.Hide();
                EmployeeUI adms = new EmployeeUI();
                adms.ShowDialog();
                this.Close();
                //   break;
            }
        }