public ActionResult Edit([Bind(Include = "Id,Name,Description")] Company company) { if (ModelState.IsValid) { db.Entry(company).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(company)); }
public ActionResult Edit([Bind(Include = "AppId,AppName")] App app) { if (ModelState.IsValid) { db.Entry(app).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(app)); }
public async Task <ActionResult> Edit([Bind(Include = "Id,Name,Price")] Job job) { if (ModelState.IsValid) { db.Entry(job).State = EntityState.Modified; await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(job)); }
public ActionResult Edit([Bind(Include = "JobId,Time,Day,Success,Files_DwUp,Files_Sorted,AppId")] Job job) { if (ModelState.IsValid) { db.Entry(job).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.AppId = new SelectList(db.Apps, "AppId", "AppName", job.AppId); return(View(job)); }