public ActionResult EditStudent(int id, string user_name, string first_name, string last_name, string dob, string email) { studentprofile sprofile = new studentprofile() { iD = id, FirstName = first_name, LastName = last_name, DoB = DateTime.ParseExact(dob, "MM/dd/yyyy HH:mm:ss tt", null), Emailaddress = email, Optional = "A", useriD = UserValidation.FindUserId(user_name) }; bool result = UserValidation.ModifyStudent(sprofile); return(View("Index", assessmentdb.studentprofile.ToList())); }
public ActionResult SubmitStudent(string user_name, string first_name, string last_name, string dob, string email) { studentprofile sprofile = new studentprofile() { iD = 0, FirstName = first_name, LastName = last_name, DoB = Convert.ToDateTime(dob), Emailaddress = email, Optional = "A", useriD = UserValidation.FindUserId(user_name) }; bool result = UserValidation.CreateStudent(sprofile); return(View("Create")); }