コード例 #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();
          }
      }
コード例 #2
0
ファイル: RecordUI.cs プロジェクト: Hafiz-SE/CallCenter
        private void buttonBack_MouseClick(object sender, MouseEventArgs e)
        {
            this.Hide();
            EmployeeUI epm = new EmployeeUI();

            epm.ShowDialog();
            this.Close();
        }
コード例 #3
0
ファイル: LoginUI.cs プロジェクト: Hafiz-SE/CallCenter
        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!");
            }
        }
コード例 #4
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;
            }
        }