public ActionResult UpdateSupplierInfo(Supplier s)
 {
     if (ModelState.IsValid)
     {
         sRepo.UpdateSupplier(s);
     }
     return RedirectToAction("ViewSuppliers");
 }
 public ActionResult AddSupplierInfo(Supplier e)
 {
     sRepo.saveSupplier(e);
     return RedirectToAction("ViewSuppliers");
 }
 public void saveSupplier(Supplier s)
 {
     db.Suppliers.Add(s);
     db.SaveChanges();
 }
 public void UpdateSupplier(Supplier s)
 {
     db.Entry(s).State = EntityState.Modified;
     db.SaveChanges();
 }
 public void DeleteSupplier(Supplier s)
 {
     db.Suppliers.Remove(s);
     db.SaveChanges();
 }