public RedirectToRouteResult EditSupplier(Supplier[] arr) { using (SSISdbEntities e = new SSISdbEntities()) { DAL.SupplierRepositoryImpl dal = new DAL.SupplierRepositoryImpl(e); dal.UpdateSupplier(arr[0]); e.SaveChanges(); Session["MaintenanceSuppliersPage"] = "1"; return(RedirectToAction("Maintenance", "Store")); } }
public RedirectToRouteResult AddNewSupplier(Supplier supplier) { using (SSISdbEntities e = new SSISdbEntities()) { supplier.Active = 1; DAL.SupplierRepositoryImpl dal = new DAL.SupplierRepositoryImpl(e); dal.InsertSupplier(supplier); e.SaveChanges(); return(RedirectToAction("Maintenance", "Store")); } }