public static DataTable LoadNhaCungCap() { string sql = "select MaSo,TenNhaCungCap from NhaCungCap"; return(XL_DULIEU.LayDuLieu(sql)); }
public static DataTable LoadNhomHang() { string sql = "select Ma,Ten from NhomHang"; return(XL_DULIEU.LayDuLieu(sql)); }
public static DataTable LayDuLieuKhoHang() { string sql = "select k.Ma,k.Ten,k.LienHe,k.DiaChi,k.DienThoai,k.ConQuanLy,nv.Ten as TenNV,k.Fax,k.Email,k.KyHieu,k.GhiChu from KhoHang k left join NhanVien nv on k.MaNguoiQuanLy=nv.Ma"; return(XL_DULIEU.LayDuLieu(sql)); }
public static DataTable LoadDonVi() { string sql = "select Ma,Ten from DonViTinh"; return(XL_DULIEU.LayDuLieu(sql)); }
public static DataTable LayDuLieuNhanVien() { string sql = "select nv.Ma,nv.Ten,nv.DiaChi,nv.DienThoai,nv.DiDong,nv.Email,nv.ConQuanLy,bp.Ten as TenBoPhan from NhanVien nv left join BoPhan bp on nv.MaBoPhan=bp.Ma"; return(XL_DULIEU.LayDuLieu(sql)); }
public static DataTable LoadNhaCungCap() { string sql = "select ncc.MaSo,ncc.TenNhaCungCap,ncc.NguoiLienHe,ncc.ChucVu,ncc.DiaChi,ncc.DienThoai,ncc.DiDong,ncc.Fax,ncc.ConQuanLy,kv.Ten from NhaCungCap ncc,KhuVuc kv where ncc.MaKhuVuc = kv.Ma"; return(XL_DULIEU.LayDuLieu(sql)); }
public static DataTable LoadCbBoPhan() { string sql = "select Ma, Ten from BoPhan"; return(XL_DULIEU.LayDuLieu(sql)); }
public static DataTable LoadKhuVuc() { string sql = "select Ma,Ten from KhuVuc"; return(XL_DULIEU.LayDuLieu(sql)); }
public static DataTable LoadMaKhachHang() { string sql = "select MaKH,TenKH from KhachHang"; return(XL_DULIEU.LayDuLieu(sql)); }
public static DataTable HienThiQuyenHan() { string sql = "select cn.TenChucNang,th.TatCa,th.TruyCap,th.Them,th.Xoa,th.Sua,th.InAn,th.Nhap,th.Xuat from VAITRO_CHUCNANG th,CHUCNANG cn,NGUOIDUNG nd where cn.ID=th.MaChucNang and nd.MaVaiTro = th.MaVaiTro and nd.MaVaiTro=1"; return(XL_DULIEU.LayDuLieu(sql)); }
public static DataTable LayThongTin(int maVaiTro) { string sql = "select * from VAITRO_CHUCNANG th,CHUCNANG cn where th.MaChucNang=cn.ID and th.MaVaiTro='" + maVaiTro + "'"; return(XL_DULIEU.LayDuLieu(sql)); }