public static List <Nguoi> GetNhanVienFromDoan(DoanDL doanDL) { using (var db = new tourEntities()) { var result = from c in db.CTDoans join n in db.Nguois on c.MaNguoiThamGia equals n.Id where n.MaVaiTro == 2 select n; return(result.ToList <Nguoi>()); } }
public static List <CTDoan> GetCTDoanByDoan(DoanDL doanDL) { using (var db = new tourEntities()) { var result = from c in db.CTDoans where c.MaDoan == doanDL.Id select c; return(result.ToList <CTDoan>()); } }
public static void Delete(DoanDL doanDL) { using (var db = new tourEntities()) { db.Entry(doanDL).State = EntityState.Deleted; db.SaveChanges(); } }
public static void Update(DoanDL doanDL) { using (var db = new tourEntities()) { db.Entry <DoanDL>(doanDL).State = EntityState.Modified; db.SaveChanges(); } }
public static void Insert(DoanDL doanDL) { using (var db = new tourEntities()) { db.DoanDLs.Add(doanDL); db.SaveChanges(); } }
public static List <ChiPhi> GetChiPhiDoan(DoanDL doanDL) { using (var db = new tourEntities()) { var result = (from c in db.ChiPhis where c.MaDoan == doanDL.Id select c); return(result.ToList <ChiPhi>()); } }