Exemple #1
0
        public ActionResult DistrictInformation(StaffInformationViewModel s)
        {
            var viewModel = new DistrictListViewModel()
            {
                Districts = new SelectList(db.Districts.ToList(), "leaID", "name")
            };

            return(View(viewModel));
        }
Exemple #2
0
 public ActionResult ButtonCheck(StaffInformationViewModel item)
 {
     if (item.StaffType == "School")
     {
         return(RedirectToAction("SchoolDistrictInformation", "Staff"));
     }
     else
     {
         return(RedirectToAction("DistrictInformation", "Staff"));
     }
 }
Exemple #3
0
        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());
        }