Пример #1
0
 public void DeleteExtendedWarranty(int _id)
 {
     using (SonnenDBEntities db = new SonnenDBEntities())
     {
         db.ExtendedWarranties.Remove(db.ExtendedWarranties.FirstOrDefault(x => x.Id == _id));
         db.SaveChanges();
     }
 }
Пример #2
0
 public bool AddInstaller(Installer _Installer)
 {
     using (SonnenDBEntities db = new SonnenDBEntities())
     {
         db.Installers.Add(_Installer);
         db.SaveChanges();
     }
     return(true);
 }
Пример #3
0
 public bool AddExtendedWarranty(ExtendedWarranty _ExtendedWarranty)
 {
     using (SonnenDBEntities db = new SonnenDBEntities())
     {
         db.ExtendedWarranties.Add(_ExtendedWarranty);
         db.SaveChanges();
     }
     return(true);
 }
Пример #4
0
 public bool UpdateExtendedWarranty(ExtendedWarranty _ExtendedWarranty)
 {
     using (SonnenDBEntities db = new SonnenDBEntities())
     {
         db.Entry(_ExtendedWarranty).State = System.Data.Entity.EntityState.Modified;
         db.SaveChanges();
     }
     return(true);
 }
Пример #5
0
 public bool UpdateInstaller(Installer _Installer)
 {
     using (SonnenDBEntities db = new SonnenDBEntities())
     {
         db.Entry(_Installer).State = System.Data.Entity.EntityState.Modified;
         db.SaveChanges();
     }
     return(true);
 }