Esempio n. 1
0
 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>());
     }
 }
Esempio n. 2
0
 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>());
     }
 }
Esempio n. 3
0
 public static void Delete(DoanDL doanDL)
 {
     using (var db = new tourEntities())
     {
         db.Entry(doanDL).State = EntityState.Deleted;
         db.SaveChanges();
     }
 }
Esempio n. 4
0
 public static void Update(DoanDL doanDL)
 {
     using (var db = new tourEntities())
     {
         db.Entry <DoanDL>(doanDL).State = EntityState.Modified;
         db.SaveChanges();
     }
 }
Esempio n. 5
0
 public static void Insert(DoanDL doanDL)
 {
     using (var db = new tourEntities())
     {
         db.DoanDLs.Add(doanDL);
         db.SaveChanges();
     }
 }
Esempio n. 6
0
 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>());
     }
 }