Ejemplo n.º 1
0
 private void OneTimePinTextBoxGotFocus()
 {
     if (OneTimePin.Equals(AppResources.IdentifyOneTimePinWaterMarkText))
     {
         OneTimePin = String.Empty;
     }
 }
Ejemplo n.º 2
0
        public ActionResult oneTimePin(OneTimePin model)
        {
            if (ModelState.IsValid)
            {
                var newStudent = (Registered_Person)Session["newStudent"];
                var personRole = new Person_Role();

                personRole.Person_ID = newStudent.Person_ID;
                personRole.Role_ID   = (from r in db.Roles
                                        where r.Role_Name == "Student"
                                        select r.Role_ID).FirstOrDefault();

                db.Registered_Person.Add(newStudent);
                db.Person_Role.Add(personRole);
                db.SaveChanges();

                //record action
                global.addAudit("Students", "Students: Registration", "Create", newStudent.Person_ID);

                Session.Remove("newStudent");
                Session.Remove("OTP");

                TempData["Message"]    = "Succesfully created an account!";
                TempData["classStyle"] = "success";

                return(RedirectToAction("Login", "Account"));
            }
            else
            {
                return(View());
            }
        }