Esempio n. 1
0
 public static Get_TKNhanVien_Result GetNhanVien(int value)
 {
     using (CuaHang_XeMayEntities entities = new CuaHang_XeMayEntities())
     {
         return(entities.Get_TKNhanVien(value).FirstOrDefault());
     }
 }
Esempio n. 2
0
 public static List <hd_Result> Search_HoaDonList(string value)
 {
     using (CuaHang_XeMayEntities entities = new CuaHang_XeMayEntities())
     {
         return(entities.hd().Where(p => p.ten_HK.Contains(value)).ToList());
     }
 }
Esempio n. 3
0
 public static List <NhanVien> Search_TTNhanVien(string value)
 {
     try {
         using (CuaHang_XeMayEntities entities = new CuaHang_XeMayEntities())
         {
             return(entities.NhanVien.Where(p => p.ten_NV.Contains(value)).ToList());
         }
     }
     catch (Exception ex)
     {
         return(null);
     }
 }
Esempio n. 4
0
 public static List <CThd_Result> get_CTListHd()
 {
     try
     {
         using (CuaHang_XeMayEntities entities = new CuaHang_XeMayEntities())
         {
             return(entities.CThd().ToList());
         }
     }catch (Exception ex)
     {
         return(null);
     }
 }
Esempio n. 5
0
 public static List <HD_BanHang> Get_ListHD()
 {
     try
     {
         using (CuaHang_XeMayEntities entities = new CuaHang_XeMayEntities())
         {
             return(entities.HD_BanHang.ToList());
         }
     }catch (Exception)
     {
         return(null);
     }
 }
Esempio n. 6
0
 public static int Get_MaHangSX()
 {
     try
     {
         using (CuaHang_XeMayEntities entities = new CuaHang_XeMayEntities())
         {
             return(entities.Hang_SX.Max(p => p.ma_Hang));
         }
     }
     catch (Exception)
     {
         return(3000);
     }
 }
Esempio n. 7
0
 public static List <ChiTiet_HD_Result> get_CTListHd()
 {
     try
     {
         using (CuaHang_XeMayEntities entities = new CuaHang_XeMayEntities())
         {
             List <ChiTiet_HD_Result> lst = entities.ChiTiet_HD().ToList();
             return(lst);
         }
     }catch (Exception)
     {
         return(null);
     }
 }
 public static List <Nha_CungCap> Search_NhaCC(string key)
 {
     try
     {
         using (CuaHang_XeMayEntities entities = new CuaHang_XeMayEntities())
         {
             return(entities.Nha_CungCap.Where(p => p.ten_NCC.Contains(key)).ToList());
         }
     }
     catch (Exception)
     {
         return(null);
     }
 }
Esempio n. 9
0
 public static int Get_MaKhachHang()
 {
     try
     {
         using (CuaHang_XeMayEntities entities = new CuaHang_XeMayEntities())
         {
             return(entities.KhachHang.Max(p => p.ma_KH));
         }
     }
     catch (Exception)
     {
         return(7000);
     }
 }
Esempio n. 10
0
 public static SanPham Get_SanPham(int maSP)
 {
     try
     {
         using (CuaHang_XeMayEntities entities = new CuaHang_XeMayEntities())
         {
             return(entities.SanPham.Where(p => p.ma_SP == maSP).FirstOrDefault());
         }
     }
     catch (Exception)
     {
         return(null);
     }
 }
Esempio n. 11
0
 public static List <Get_SanPhamList_Result> Get_SanPhamList()
 {
     try
     {
         using (CuaHang_XeMayEntities entities = new CuaHang_XeMayEntities())
         {
             return(entities.Get_SanPhamList().ToList());
         }
     }
     catch (Exception)
     {
         return(null);
     }
 }
Esempio n. 12
0
 public static int Get_MaDanhMuc()
 {
     try
     {
         using (CuaHang_XeMayEntities entities = new CuaHang_XeMayEntities())
         {
             return(entities.DanhMuc.Max(p => p.ma_DM));
         }
     }
     catch (Exception)
     {
         return(4000);
     }
 }
Esempio n. 13
0
 public static Gia_SP Get_GiaSP(int ma_Gia)
 {
     try
     {
         using (CuaHang_XeMayEntities entities = new CuaHang_XeMayEntities())
         {
             return(entities.Gia_SP.Where(p => p.ma_GiaSP == ma_Gia).FirstOrDefault());
         }
     }
     catch (Exception)
     {
         return(null);
     }
 }
Esempio n. 14
0
 public static Loai_SP Get_LoaiSP(int maLoai)
 {
     try
     {
         using (CuaHang_XeMayEntities entities = new CuaHang_XeMayEntities())
         {
             return(entities.Loai_SP.Where(p => p.ma_Loai == maLoai).FirstOrDefault());
         }
     }
     catch (Exception)
     {
         return(null);
     }
 }
Esempio n. 15
0
 public static int Get_MaLoaiSP()
 {
     try
     {
         using (CuaHang_XeMayEntities entities = new CuaHang_XeMayEntities())
         {
             return(entities.Loai_SP.Max(p => p.ma_Loai));
         }
     }
     catch (Exception)
     {
         return(2000);
     }
 }
Esempio n. 16
0
 public static List <Loai_SP> Search_LoaiSP(string key)
 {
     try
     {
         using (CuaHang_XeMayEntities entities = new CuaHang_XeMayEntities())
         {
             return(entities.Loai_SP.Where(p => p.ten_Loai.Contains(key)).ToList());
         }
     }
     catch (Exception)
     {
         return(null);
     }
 }
Esempio n. 17
0
 public static List <Loai_SP> Get_LoaiSPList()
 {
     try
     {
         using (CuaHang_XeMayEntities entities = new CuaHang_XeMayEntities())
         {
             return(entities.Loai_SP.ToList());
         }
     }
     catch (Exception)
     {
         return(null);
     }
 }
Esempio n. 18
0
 public static Nha_CungCap Get_NhaCungCap(int ma_NCC)
 {
     try
     {
         using (CuaHang_XeMayEntities entities = new CuaHang_XeMayEntities())
         {
             return(entities.Nha_CungCap.Where(p => p.ma_NCC == ma_NCC).FirstOrDefault());
         }
     }
     catch (Exception)
     {
         return(null);
     }
 }
Esempio n. 19
0
 public static int Get_MaNhaCungCap()
 {
     try
     {
         using (CuaHang_XeMayEntities entities = new CuaHang_XeMayEntities())
         {
             return(entities.Nha_CungCap.Max(p => p.ma_NCC));
         }
     }
     catch (Exception)
     {
         return(1000);
     }
 }
Esempio n. 20
0
 public static List <DanhMuc> Get_DanhMucList()
 {
     try
     {
         using (CuaHang_XeMayEntities entities = new CuaHang_XeMayEntities())
         {
             return(entities.DanhMuc.ToList());
         }
     }
     catch (Exception)
     {
         return(null);
     }
 }
Esempio n. 21
0
 public static List <DanhMuc> Search_DanhMuc(string key)
 {
     try
     {
         using (CuaHang_XeMayEntities entities = new CuaHang_XeMayEntities())
         {
             return(entities.DanhMuc.Where(p => p.ten_DM.Contains(key)).ToList());
         }
     }
     catch (Exception)
     {
         return(null);
     }
 }
Esempio n. 22
0
 public static int Get_MaGiaSP()
 {
     try
     {
         using (CuaHang_XeMayEntities entities = new CuaHang_XeMayEntities())
         {
             return(entities.Gia_SP.Max(p => p.ma_GiaSP));
         }
     }
     catch (Exception)
     {
         return(10000);
     }
 }
Esempio n. 23
0
 public static DanhMuc Get_DanhMuc(int maDM)
 {
     try
     {
         using (CuaHang_XeMayEntities entities = new CuaHang_XeMayEntities())
         {
             return(entities.DanhMuc.Where(p => p.ma_DM == maDM).FirstOrDefault());
         }
     }
     catch (Exception)
     {
         return(null);
     }
 }
Esempio n. 24
0
 public static List <NhanVien> getNhanvien_List()
 {
     try
     {
         using (CuaHang_XeMayEntities entities = new CuaHang_XeMayEntities())
         {
             return(entities.NhanVien.ToList());
         }
     }
     catch
     {
         return(null);
     }
 }
Esempio n. 25
0
 public static int Get_MaSanPham()
 {
     try
     {
         using (CuaHang_XeMayEntities entities = new CuaHang_XeMayEntities())
         {
             return(entities.SanPham.Max(p => p.ma_SP));
         }
     }
     catch (Exception)
     {
         return(14000);
     }
 }
Esempio n. 26
0
 public static List <Hang_SX> Search_HangSX(string key)
 {
     try
     {
         using (CuaHang_XeMayEntities entities = new CuaHang_XeMayEntities())
         {
             return(entities.Hang_SX.Where(p => p.ten_Hang.Contains(key)).ToList());
         }
     }
     catch (Exception)
     {
         return(null);
     }
 }
Esempio n. 27
0
 public static List <KhachHang> Get_KhachHangList()
 {
     try
     {
         using (CuaHang_XeMayEntities entities = new CuaHang_XeMayEntities())
         {
             return(entities.KhachHang.ToList());
         }
     }
     catch (Exception)
     {
         return(null);
     }
 }
Esempio n. 28
0
 public static Hang_SX Get_HangSX(int ma_Hang)
 {
     try
     {
         using (CuaHang_XeMayEntities entities = new CuaHang_XeMayEntities())
         {
             return(entities.Hang_SX.Where(p => p.ma_Hang == ma_Hang).FirstOrDefault());
         }
     }
     catch (Exception)
     {
         return(null);
     }
 }
Esempio n. 29
0
 public static KhachHang Get_KhachHang(int maKH)
 {
     try
     {
         using (CuaHang_XeMayEntities entities = new CuaHang_XeMayEntities())
         {
             return(entities.KhachHang.Where(p => p.ma_KH == maKH).FirstOrDefault());
         }
     }
     catch (Exception)
     {
         return(null);
     }
 }
Esempio n. 30
0
 public static List <Nha_CungCap> Get_NhaCungCapList()
 {
     try
     {
         using (CuaHang_XeMayEntities entities = new CuaHang_XeMayEntities())
         {
             return(entities.Nha_CungCap.ToList());
         }
     }
     catch (Exception)
     {
         return(null);
     }
 }