public ActionResult Edit(string id, EmployeeDepartmentTableDetails data) { try { if (ModelState.IsValid) { db.Entry(data).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View()); } catch { return(View()); } }
public ActionResult Edit(int id, [Bind("Id,Name,DateOfBirth,Address,ContactNumber,City,Country")] EmployeeTableDetails data) { try { if (ModelState.IsValid) { db.Entry(data).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View()); } catch { return(View()); } }
public ActionResult Edit(int id, [Bind("ClientNumber,ClientName,Address,City,State,Pincode")] ClientTableData client) { try { if (ModelState.IsValid) { db.Entry(client).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View()); } catch { return(View()); } }