public ActionResult Edit([Bind(Include = "SchoolDesc,FirstName,LastName,SchoolId,RoleId,UserEmail,UserId")] SchoolTeacher schoolteacher) { if (ModelState.IsValid) { db.Entry(schoolteacher).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(schoolteacher)); }
public ActionResult Edit([Bind(Include = "ClassTeacherId,ClassId,UserId,CreateDatetime,ChangeDatetime")] tblClassTeacher tblclassteacher) { if (ModelState.IsValid) { _db.Entry(tblclassteacher).State = EntityState.Modified; _db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.ClassId = new SelectList(_db.tblClasses, "ClassId", "ClassDesc", tblclassteacher.ClassId); ViewBag.UserId = new SelectList(_db.tblUsers, "UserId", "UserEmail", tblclassteacher.UserId); return(View(tblclassteacher)); }
public ActionResult Edit([Bind(Include = "SchoolId,DistrictId,SchoolDesc,AddressId,CreateDatetime,ChangeDatetime")] tblSchool tblschool) { if (ModelState.IsValid) { db.Entry(tblschool).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.AddressId = new SelectList(db.tblAddresses, "AddressId", "Address1", tblschool.AddressId); ViewBag.DistrictId = new SelectList(db.tblDistricts, "DistrictId", "DistrictDesc", tblschool.DistrictId); return(View(tblschool)); }
public ActionResult Edit([Bind(Include = "ImportId,ImportTypeId,ImportFile,UserId,ReadyToProcess,ProcesseDateTime,CreateDatetime")] tblImport tblimport) { if (ModelState.IsValid) { db.Entry(tblimport).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.ImportTypeId = new SelectList(db.tblImportTypes, "ImportTypeId", "ImportTypeDesc", tblimport.ImportTypeId); ViewBag.UserId = new SelectList(db.tblUsers, "UserId", "UserEmail", tblimport.UserId); return(View(tblimport)); }