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