public static int SelectLastMaPhieuGiaoNhan() { using (Context context = new Model.Context()) { return((from t in context.PhieuGiaoNhan orderby t.MaPhieuGiaoNhan descending select t).FirstOrDefault().MaPhieuGiaoNhan); } }
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()); } }
public static PhieuGiaoNhan SelectPhieuGiaoNhanByMa(int maPhieuGiaoNhan) { using (Context context = new Model.Context()) { return(context.PhieuGiaoNhan.Find(maPhieuGiaoNhan)); } }
public static DonVi SelectDonViByMa(int maDonVi) { using (Context context = new Model.Context()) { return(context.DonVi.Find(maDonVi)); } }
public static ThietBi SelectThietBiByMa(int maThietBi) { using (Context context = new Model.Context()) { return(context.ThietBi.Find(maThietBi)); } }
public static List <ThietBi> SelectThietBiByLoai(int maLoai) { using (Context context = new Model.Context()) { return(context.ThietBi.Where(tb => tb.MaLoai == maLoai).ToList()); } }