public ActionResult Edit([Bind(Include = "Id,First_name,Last_name,Phone,Email,DOB,Sex,Weight,Height,type")] UserTable userTable) { try { if (ModelState.IsValid) { db.Entry(userTable).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } } catch (Exception genericException) { ViewBag.ExceptionMessage = genericException; } return(View(userTable)); }
public ActionResult Edit([Bind(Include = "Symptom_Id,Symptom_Desc,User_Id,C_Time")] Symptom symptom) { try { if (ModelState.IsValid) { db.Entry(symptom).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.User_Id = new SelectList(db.UserTables, "Id", "First_name", symptom.User_Id); ViewBag.User_Id = new SelectList(db.UserTables, "Id", "First_name", symptom.User_Id); } catch (Exception genericException) { ViewBag.ExceptionMessage = genericException; } return(View(symptom)); }