Esempio n. 1
0
        private void FNhanVien_Load(object sender, EventArgs e)
        {
            DAO_NhanVien        dao  = new DAO_NhanVien();
            List <DTO_NhanVien> list = new List <DTO_NhanVien>();

            list = dao.List();
            foreach (var item in list)
            {
                string       NgayKetThuc = "";
                ListViewItem it          = new ListViewItem(item.ID.ToString());
                it.SubItems.Add(item.Hoten);
                it.SubItems.Add(item.Diachi);
                it.SubItems.Add(item.SDT.ToString());
                it.SubItems.Add(item.Ngaybatdaulam.ToString());
                if (item.Ngayketthuc.ToString() == "1/1/0001 12:00:00 AM")
                {
                    it.SubItems.Add(NgayKetThuc);
                }
                else
                {
                    it.SubItems.Add(item.Ngayketthuc.ToString());
                }
                string TenQuyen = dao.TenQuyen(item.PhanQuyenID).ToString();
                it.SubItems.Add(TenQuyen);
                listView1.Items.Add(it);
            }
        }
Esempio n. 2
0
        private void listView1_MouseClick(object sender, MouseEventArgs e)
        {
            DAO_NhanVien dao = new DAO_NhanVien();

            tbHoTen.Text        = listView1.SelectedItems[0].SubItems[1].Text;
            tbDiaChi.Text       = listView1.SelectedItems[0].SubItems[2].Text;
            tbSDT.Text          = listView1.SelectedItems[0].SubItems[3].Text;
            dtpNgayBatDau.Text  = listView1.SelectedItems[0].SubItems[4].Text;
            dtpNgayKetThuc.Text = listView1.SelectedItems[0].SubItems[5].Text;
            long ID = Convert.ToInt32(dao.IDPhanQuyen(listView1.SelectedItems[0].SubItems[6].Text));

            cbbPhanQuyen.Text = ID.ToString();
        }
 public static void Sua_nhanvien(DTO_NhanVien gv)
 {
     DAO_NhanVien.Sua_nhanvien(gv);
 }
 public static void Them_nhanvien(DTO_NhanVien nv)
 {
     DAO_NhanVien.Them_nhanvien(nv);
 }
 public static DataTable Hienthi_nhanvien_theoPB(string khoa)
 {
     return(DAO_NhanVien.Hienthi_nhanvien_theoPB(khoa));
 }
 public static DataTable Hienthi_nhanvien_theoten(string ten)
 {
     return(DAO_NhanVien.Hienthi_nhanvien_theoten(ten));
 }
 public static DataTable Hienthi_nhanvien_theoma(string ma)
 {
     return(DAO_NhanVien.Hienthi_nhanvien_theoma(ma));
 }
 public static DataTable Hienthi_nhanvien_all()
 {
     return(DAO_NhanVien.HIENTHI_NHANVIEN_ALL());
 }
Esempio n. 9
0
 public static List <DTO_NhanVien> LoadNhanVienMaNV(string maNV)
 {
     return(DAO_NhanVien.LoadNhanVienMaNV(maNV));
 }
Esempio n. 10
0
 public static DataTable GetEmployeeHistory(string startDate, string endDate, string deptid)
 {
     return(DAO_NhanVien.GetEmployeeHistory(startDate, endDate, deptid));
 }
Esempio n. 11
0
 public static DataTable LoadStatus()
 {
     return(DAO_NhanVien.LoadStatus());
 }
Esempio n. 12
0
 public static string LaySoLuongNhanVienByMaBoPhan(string maBoPhan)
 {
     return(DAO_NhanVien.LaySoLuongNhanVienByMaBoPhan(maBoPhan));
 }
Esempio n. 13
0
 public static int DieuChuyen(DataTable dt, string boPhan)
 {
     return(DAO_NhanVien.DieuChuyen(dt, boPhan));
 }
Esempio n. 14
0
 public static bool UpdateNhanVien(DTO_NhanVien nv)
 {
     return(DAO_NhanVien.UpdateNhanVien(nv));
 }
Esempio n. 15
0
 public static void Xoa_nhanvien(string gv)
 {
     DAO_NhanVien.Xoa_nhanvien(gv);
 }
Esempio n. 16
0
 public static DataTable laytennhanvien()
 {
     return(DAO_NhanVien.laytennhanvien());
 }
Esempio n. 17
0
 //Phương thức lấy full list nhân viên
 public static DataTable LoadNhanVien(string boPhan, int mode)
 {
     return(DAO_NhanVien.LoadNhanVien(boPhan, mode));
 }