public ActionResult Edit([Bind(Include = "ID,SchoolName,StudentAddress,StudentCity,StudentProvince,ContactNumber1,ContactNumber2,TotalEnrollment,FocalPersonName,FocalPersonContact")] School school) { if (ModelState.IsValid) { db.Entry(school).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(school)); }
public ActionResult Edit([Bind(Include = "ID,LastName,FirstName,FatherName,TotalIncome,IncomeEvidence,StudentAddress,StudentCity,StudentProvince,ContactNumber,DateOfBirth")] Students students) { if (ModelState.IsValid) { db.Entry(students).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(students)); }
public ActionResult Edit([Bind(Include = "Id,Email,Password,Role,Avatar")] User user) { if (ModelState.IsValid) { db.Entry(user).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.Id = new SelectList(db.UserInfors, "Id", "Name", user.Id); return(View(user)); }