Пример #1
0
        private void btnTQL_Click(object sender, RoutedEventArgs e)
        {
            TCQuanLy tc = new TCQuanLy(TENDN);

            tc.Show();
            this.Close();
        }
Пример #2
0
        private void btnQL_MouseUp(object sender, MouseButtonEventArgs e)
        {
            TCQuanLy tc = new TCQuanLy(TENDN);

            tc.Show();
            this.Close();
        }
Пример #3
0
        private void Image_MouseUp(object sender, MouseButtonEventArgs e)
        {
            TCQuanLy ql = new TCQuanLy(TENDN);

            ql.Show();
            this.Close();
        }
Пример #4
0
        private void btnHome_Click(object sender, RoutedEventArgs e)
        {
            TCQuanLy f = new TCQuanLy(TENDN);

            f.Show();
            this.Close();
        }
Пример #5
0
 private void btnDangNhap_Click(object sender, RoutedEventArgs e)
 {
     if (string.IsNullOrEmpty(txtUser.Text) || string.IsNullOrEmpty(txtPass.Password.ToString()))
     {
         MessageBox.Show("Dữ liệu chưa đầy đủ!");
         return;
     }
     else
     {
         int mess = tk.DangNhap(txtUser.Text, txtPass.Password.ToString());
         if (mess == 1)
         {
             if (txtUser.Text == "Admin" || txtUser.Text == "admin" || txtUser.Text == "ADMIN")
             {
                 MessageBox.Show("Đăng nhập thành công!!", "Tộc phèo caffein hân hoan chào đón: ", MessageBoxButton.OK, MessageBoxImage.Asterisk);
                 TCQuanLy ql = new TCQuanLy(txtUser.Text);
                 this.Close();
                 ql.Show();
             }
             else
             {
                 string user = txtUser.Text;
                 string test = user.Substring(0, 2);
                 if (test == "NV" || test == "nv")
                 {
                     MessageBox.Show("Đăng nhập thành công!!", "Tộc phèo caffein hân hoan chào đón: ", MessageBoxButton.OK, MessageBoxImage.Asterisk);
                     TCNhanVien nv = new TCNhanVien(txtUser.Text);
                     this.Close();
                     nv.Show();
                 }
                 else
                 {
                     MessageBox.Show("Đăng nhập thành công!!", "Tộc phèo caffein hân hoan chào đón: ", MessageBoxButton.OK, MessageBoxImage.Asterisk);
                     TCKhachHang kh = new TCKhachHang(txtUser.Text);
                     this.Close();
                     kh.Show();
                 }
             }
         }
         else
         {
             MessageBox.Show("Username hoặc Password chưa chính xác!!", "Tộc phèo caffein buồn bã thông báo: ", MessageBoxButton.OK, MessageBoxImage.Asterisk);
         }
     }
 }