public ActionResult DistrictInformation(StaffInformationViewModel s) { var viewModel = new DistrictListViewModel() { Districts = new SelectList(db.Districts.ToList(), "leaID", "name") }; return(View(viewModel)); }
public ActionResult ButtonCheck(StaffInformationViewModel item) { if (item.StaffType == "School") { return(RedirectToAction("SchoolDistrictInformation", "Staff")); } else { return(RedirectToAction("DistrictInformation", "Staff")); } }
public ActionResult Create(StaffInformationViewModel info) { SimplerAES item = new SimplerAES(); string hash = item.Encrypt(info.Password); info.PasswordHash = hash; db.Staffs.Add(new Staff { firstName = info.FirstName, lastName = info.LastName, positionTitle = info.PositionTitle, leaID = Session["leaID"].ToString(), schoolID = Session["schoolID"].ToString(), phoneNumber = info.PhoneNumber, email = info.Email, username = info.Username, password = info.PasswordHash }); db.SaveChanges(); return(View()); }