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; } } }
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); }
//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; } } }
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); }