Пример #1
0
        private void dos()
        {
            CanBoGiaoVienBLL cb = new CanBoGiaoVienBLL();

            foreach (CanBoGiaoVien item in cb.dscb())
            {
                if (item.Taikhoan == TenUsers)
                {
                    doDucVinhToolStripMenuItem.Text = item.HoTen;
                    MAGV = item.MaCanBo;
                    break;
                }
            }
        }
Пример #2
0
        private bool chk()
        {
            CanBoGiaoVienBLL cb = new CanBoGiaoVienBLL();

            foreach (CanBoGiaoVien item in cb.dscb())
            {
                if (item.Taikhoan == txtuser.Text && item.MatKHau == txtpass.Text)
                {
                    LoaiTaiKhoan = item.LoaiTaiKhoan;
                    return(true);
                }
            }

            return(false);
        }
Пример #3
0
 //lay thong tin giao vien
 private void Lay()
 {
     foreach (var item in cc.dscb())
     {
         if (magv == item.MaCanBo)
         {
             ten.Text        = item.HoTen;
             ma.Text         = item.MaCanBo;
             lbht.Text       = item.HoTen;
             lbdiachi.Text   = item.DiaChi;
             lbloaitk.Text   = item.LoaiTaiKhoan;
             lbmatkhau.Text  = item.MatKHau;
             lbma.Text       = item.MaCanBo;
             lbsdt.Text      = item.Sdt;
             lbloaitk.Text   = item.LoaiTaiKhoan;
             lbtaikhoan.Text = item.Taikhoan;
         }
     }
 }
Пример #4
0
        private bool chk()
        {
            CanBoGiaoVienBLL cb = new CanBoGiaoVienBLL();

            foreach (CanBoGiaoVien item in cb.dscb())
            {
                string TK = item.Taikhoan;
                string MK = item.MatKHau;
                tk.Add(TK);
                mk.Add(MK);
            }
            for (int i = 0; i < tk.Count; i++)
            {
                if (tk[i] == txtuser.Text && mk[i] == txtpass.Text)
                {
                    return(true);
                }
            }
            return(false);
        }