Exemple #1
0
 public GV_LHDAO()
 {
     dp = new DataProvider();
 }
Exemple #2
0
 public LopDAO()
 {
     dp = new DataProvider();
 }
Exemple #3
0
        public List <NhanVien_DTO> LayDsNV()
        {
            List <NhanVien_DTO> dsNV = new List <NhanVien_DTO>();


            SqlDataReader dr = DataProvider.Retrieve_Table(Query.dsThongTinhNhanVien);

            while (dr.Read())
            {
                NhanVien_DTO nv = new NhanVien_DTO();
                if (!dr.IsDBNull(0))
                {
                    nv.MaNV = (string)dr["MaNV"];
                }
                if (!dr.IsDBNull(1))
                {
                    nv.HoTen = (string)dr["HoTen"];
                }
                if (!dr.IsDBNull(2))
                {
                    nv.DiaChi = (string)dr["DiaChi"];
                }
                if (!dr.IsDBNull(3))
                {
                    nv.NgaySinh = (DateTime)dr["NgaySinh"];
                }
                if (!dr.IsDBNull(4))
                {
                    nv.SDT = (string)dr["SDT"];
                }
                if (!dr.IsDBNull(5))
                {
                    nv.Email = (string)dr["Email"];
                }
                if (!dr.IsDBNull(6))
                {
                    nv.Luong = (decimal)dr[6];
                }
                if (!dr.IsDBNull(7))
                {
                    nv.CMND = (string)dr["CMND"];
                }
                if (!dr.IsDBNull(8))
                {
                    nv.AnhDaiDien = (string)dr["AnhDaiDien"];
                }
                if (!dr.IsDBNull(9))
                {
                    nv.MaTaiKhoan_NV = (string)dr[9];
                }
                if (!dr.IsDBNull(10))
                {
                    nv.TrangThai_NV = (int)dr[10];
                }
                if (!dr.IsDBNull(11))
                {
                    nv.MaTaiKhoan = (string)dr[11];
                }
                if (!dr.IsDBNull(12))
                {
                    nv.TenTaiKhoan = (string)dr["TenTaiKhoan"];
                }
                if (!dr.IsDBNull(13))
                {
                    nv.MatKhau = (string)dr["MatKhau"];
                }
                if (!dr.IsDBNull(14))
                {
                    nv.NgayTao = (DateTime)dr["NgayTao"];
                }
                if (!dr.IsDBNull(15))
                {
                    nv.MaLoaiTK_TK = (string)dr[15];
                }
                if (!dr.IsDBNull(16))
                {
                    nv.TrangThai_TK = (Boolean)dr[16];
                }
                if (!dr.IsDBNull(17))
                {
                    nv.MaLoaiTK = (string)dr[17];
                }
                if (!dr.IsDBNull(18))
                {
                    nv.TenLoaiTK = (string)dr[18];
                }
                if (!dr.IsDBNull(19))
                {
                    nv.TrangThai = (bool)dr[19];
                }
                dsNV.Add(nv);
            }
            return(dsNV);
        }
Exemple #4
0
 public BenhNhanDAO()
 {
     dp = new DataProvider();
 }
Exemple #5
0
 public static string CreateLoaiPhieuXuatId()
 {
     return((string)DataProvider.ExecuteScalar("usp_CreateLoaiPhieuXuatId"));
 }
Exemple #6
0
        public bool KtraDangNhap(string TenTaiKhoan, string MatKhau)
        {
            string sql = string.Format(Query.Ktra_TaiKhoan_MatKhau, TenTaiKhoan, MatKhau);

            return(DataProvider.Retrieve_Count(sql) == 1 ? true : false);
        }
Exemple #7
0
 public PhieuNhapDAO()
 {
     dp = new DataProvider();
 }
Exemple #8
0
 public QuyDinhDAO()
 {
     dp = new DataProvider();
 }
 public static string CreateSanPhamId()
 {
     return((string)DataProvider.ExecuteScalar("usp_CreateSanPhamId"));
 }
Exemple #10
0
 public static void RunDelSQLOnHDB(string makh)
 {
     DataProvider.RunDelSQL("sp_xoaKHtrenHDB", DataProvider.con, makh, "@IdKH");
 }
Exemple #11
0
 public static void RunDelSQL(string makh)
 {
     DataProvider.RunDelSQL("sp_XoaKH", DataProvider.con, makh, "@IdKH");
 }
Exemple #12
0
 public static DataTable hienthikh()
 {
     return(DataProvider.GetDatatoTable("sp_hienthikhachhang", DataProvider.con));
 }
Exemple #13
0
 public static DataTable hienthikhcuthe(string makh)
 {
     return(DataProvider.GetDataSpecific("sp_hienthiKHcuthe", DataProvider.con, makh, "@IdKH"));
 }