Esempio n. 1
0
 public static int SelectLastMaPhieuGiaoNhan()
 {
     using (Context context = new Model.Context()) {
         return((from t in context.PhieuGiaoNhan
                 orderby t.MaPhieuGiaoNhan descending
                 select t).FirstOrDefault().MaPhieuGiaoNhan);
     }
 }
Esempio n. 2
0
 public static List <ChiTietPhieuGiaoNhan> SelectChiTietPhieuGiaoNhan(int maPhieuGiaoNhan)
 {
     using (Context context = new Model.Context()) {
         //return context.ChiTietPhieuGiaoNhan.Where(ct => ct.MaPhieuGiaoNhan == maPhieuGiaoNhan).ToList();
         return((from l in context.ChiTietPhieuGiaoNhan
                 where l.MaPhieuGiaoNhan == maPhieuGiaoNhan
                 select l).ToList());
     }
 }
Esempio n. 3
0
 public static PhieuGiaoNhan SelectPhieuGiaoNhanByMa(int maPhieuGiaoNhan)
 {
     using (Context context = new Model.Context()) {
         return(context.PhieuGiaoNhan.Find(maPhieuGiaoNhan));
     }
 }
Esempio n. 4
0
 public static DonVi SelectDonViByMa(int maDonVi)
 {
     using (Context context = new Model.Context()) {
         return(context.DonVi.Find(maDonVi));
     }
 }
Esempio n. 5
0
 public static ThietBi SelectThietBiByMa(int maThietBi)
 {
     using (Context context = new Model.Context()) {
         return(context.ThietBi.Find(maThietBi));
     }
 }
Esempio n. 6
0
 public static List <ThietBi> SelectThietBiByLoai(int maLoai)
 {
     using (Context context = new Model.Context()) {
         return(context.ThietBi.Where(tb => tb.MaLoai == maLoai).ToList());
     }
 }