Exemplo n.º 1
0
 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));
 }
Exemplo n.º 2
0
 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));
 }
Exemplo n.º 3
0
 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));
 }