Exemplo n.º 1
0
 private void btnLogin_Click(object sender, EventArgs e)
 {
     if (txtUsername.Text != "" && txtPass.Text != "")
     {
         DTO_Account dn = new DTO_Account(txtUsername.Text, txtPass.Text);
         if (busAccount.DangNhap(dn))
         {
             Session.tk = txtUsername.Text;
             Session.mk = txtPass.Text;
             if (busAccount.checkISADMIN(txtUsername.Text))
             {
                 Session.isAdmin = true;
             }
             var homepage = new GUI_Homepage();
             homepage.ShowDialog();
             this.Close();
         }
         else
         {
             MessageBox.Show("Sai tài khoản/mật khẩu");
         }
     }
     else
     {
         MessageBox.Show("Điền đẩy đủ thông tin");
     }
 }
Exemplo n.º 2
0
        public static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            GUI_Homepage mainForm = new GUI_Homepage();

            //Application.Run(mainForm);
            Application.Run(new GUI_DangNhap());
        }