Exemplo n.º 1
0
        public bool timKiemHS(GunaTextBox mnv, GunaTextBox ten, GunaDateTimePicker ns, GunaTextBox gt, GunaTextBox sdt, GunaTextBox eml, GunaDateTimePicker ntd, GunaTextBox mpb, /*GunaTextBox tk, GunaTextBox mk, GunaTextBox q,*/ DataGridView tdcm, DataGridView tdnn, DataGridView qtct)
        {
            HoSoNV_DTO nv = qlhs.timKiem(mnv.Text);

            try
            {
                ten.Text  = nv.HoTen;
                ns.Value  = nv.NgaySinh;
                gt.Text   = nv.GioiTinh;
                sdt.Text  = nv.SDT;
                eml.Text  = nv.Email;
                ntd.Value = nv.NgayTD;
                mpb.Text  = nv.MaPB;
                //tk.Text = nv.TaiKhoan;
                //mk.Text = nv.MatKhau;
                //q.Text = nv.Quyen;
                qlhs.hienThiTDCM(tdcm, mnv.Text);
                qlhs.hienThiTDNN(tdnn, mnv.Text);
                qlhs.hienThiQTCT(qtct, mnv.Text);
            }
            catch (Exception)
            {
            }
            if (nv.HoTen != null)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Exemplo n.º 2
0
        public void timKiemTrinhDoChuyenMon_DAO(HoSoNV_DTO nhanvien)
        {
            var layTT = from td in db.HOSO6s
                        where td.MANV == nhanvien.MaNV
                        select new { td.HOTEN };

            foreach (var item in layTT)
            {
                nhanvien.HoTen = item.HOTEN;
            }
        }
        public HoSoNV_DTO layThongTinHoSo_DAO(string txtMaNV)
        {
            HoSoNV_DTO nhanVien = new HoSoNV_DTO();

            txtMaNV = txtMaNV.ToUpper();
            var query = from q in db.HOSO6s
                        where q.MANV == txtMaNV
                        select new { q.MANV, q.HOTEN };

            foreach (var item in query)
            {
                nhanVien.MaNV  = item.MANV;
                nhanVien.HoTen = item.HOTEN;
            }
            return(nhanVien);
        }
        public bool timKiemTrinhDoChuyenMon_BUS(GunaTextBox maNV, GunaLabel txtTenNV, GunaDataGridView gr)
        {
            HoSoNV_DTO nv = new HoSoNV_DTO
            {
                MaNV = maNV.Text
            };

            TrinhDoChuyenMon_DAO.createInstance.timKiemTrinhDoChuyenMon_DAO(nv);
            txtTenNV.Text = nv.HoTen;
            if (nv.HoTen == null)
            {
                return(false);
            }
            TrinhDoChuyenMon_DAO.createInstance.hienThi(gr, nv.MaNV);
            return(true);
        }
Exemplo n.º 5
0
        public bool layThongTinHoSo_BUS(GunaTextBox txtMaNV, GunaLabel lb1, GunaLabel lb2)
        {
            HoSoNV_DTO nhanvien = new HoSoNV_DTO();

            nhanvien = QuanLyQuaTrinhCongTac_DAO.Instance.layThongTinHoSo_DAO(txtMaNV.Text);

            if (nhanvien.MaNV != null)
            {
                lb1.Text = nhanvien.MaNV;
                lb2.Text = nhanvien.HoTen;
                return(true);
            }
            else
            {
                return(false);
            }
        }
Exemplo n.º 6
0
        public HoSoNV_DTO timKiem(string maNV)
        {
            HoSoNV_DTO         nv    = new HoSoNV_DTO();
            IQueryable <HOSO6> query = from q in db.HOSO6s where q.MANV == maNV select q;

            foreach (HOSO6 item in query)
            {
                nv.MaNV     = maNV;
                nv.HoTen    = item.HOTEN;
                nv.NgaySinh = Convert.ToDateTime(item.NGAYSINH);
                nv.GioiTinh = item.GIOITINH;
                nv.SDT      = item.SODT;
                nv.Email    = item.EMAIL;
                nv.NgayTD   = Convert.ToDateTime(item.NGAYTD);
                nv.MaPB     = item.MAPB;
                nv.TaiKhoan = item.TAIKHOAN;
                nv.MatKhau  = item.MATKHAU;
                nv.Quyen    = item.QUYEN;
            }

            return(nv);
        }