Beispiel #1
0
        public List <ExtendedWarranty> getAllExtendedWarrantysList()
        {
            SonnenDBEntities        db = new SonnenDBEntities();
            List <ExtendedWarranty> ExtendedWarrantys = db.ExtendedWarranties.ToList();

            return(ExtendedWarrantys);
        }
Beispiel #2
0
        public List <Installer> getInstallersList()
        {
            SonnenDBEntities db         = new SonnenDBEntities();
            List <Installer> Installers = db.Installers.ToList();

            return(Installers);
        }
Beispiel #3
0
 public void DeleteExtendedWarranty(int _id)
 {
     using (SonnenDBEntities db = new SonnenDBEntities())
     {
         db.ExtendedWarranties.Remove(db.ExtendedWarranties.FirstOrDefault(x => x.Id == _id));
         db.SaveChanges();
     }
 }
Beispiel #4
0
 public bool AddInstaller(Installer _Installer)
 {
     using (SonnenDBEntities db = new SonnenDBEntities())
     {
         db.Installers.Add(_Installer);
         db.SaveChanges();
     }
     return(true);
 }
Beispiel #5
0
 public bool UpdateExtendedWarranty(ExtendedWarranty _ExtendedWarranty)
 {
     using (SonnenDBEntities db = new SonnenDBEntities())
     {
         db.Entry(_ExtendedWarranty).State = System.Data.Entity.EntityState.Modified;
         db.SaveChanges();
     }
     return(true);
 }
Beispiel #6
0
 public bool AddExtendedWarranty(ExtendedWarranty _ExtendedWarranty)
 {
     using (SonnenDBEntities db = new SonnenDBEntities())
     {
         db.ExtendedWarranties.Add(_ExtendedWarranty);
         db.SaveChanges();
     }
     return(true);
 }
Beispiel #7
0
 public bool UpdateInstaller(Installer _Installer)
 {
     using (SonnenDBEntities db = new SonnenDBEntities())
     {
         db.Entry(_Installer).State = System.Data.Entity.EntityState.Modified;
         db.SaveChanges();
     }
     return(true);
 }
Beispiel #8
0
        public Installer getInstallerById(int _Id)
        {
            Installer Installer;

            using (SonnenDBEntities db = new SonnenDBEntities())
            {
                Installer = db.Installers.FirstOrDefault(x => x.Id == _Id);
            }

            return(Installer);
        }
Beispiel #9
0
        public ExtendedWarranty getExtendedWarrantyById(int _Id)
        {
            ExtendedWarranty ExtendedWarranty;

            using (SonnenDBEntities db = new SonnenDBEntities())
            {
                ExtendedWarranty = db.ExtendedWarranties.FirstOrDefault(x => x.Id == _Id);
            }

            return(ExtendedWarranty);
        }