public ActionResult Edit(RoutingSlip routingslip) { if (ModelState.IsValid) { _db.Entry(routingslip).State = EntityState.Modified; _db.SaveChanges(); return(RedirectToAction("Index", new { id = routingslip.RoutingSlipID })); } return(View(routingslip)); }
public ActionResult SetProfile(Employee employee) //int id, FormCollection collection { employee.Email = System.Web.HttpContext.Current.User.Identity.Name; if (ModelState.IsValid) { _db.Entry(employee).State = System.Data.Entity.EntityState.Modified; _db.SaveChanges(); return(RedirectToAction("Index", "Home", new { id = employee.EmployeeID })); } return(View(employee)); //try //{ // // TODO: Add update logic here // return RedirectToAction("Index", "Home"); //} //catch //{ //} }