Ejemplo n.º 1
0
 public void SetUp()
 {
     student = new StudentEducationalInfo()
     {
         secondarySchoolName       = "Don Bosco",
         seniorSecondarySchoolName = "Shivam International",
         collegeName       = "JSS",
         collegePercentage = 90
     };
 }
Ejemplo n.º 2
0
 public void UpdateStudentEducationInfoIntoDatabase(StudentEducationalInfo student)
 {
     try {
         studentEducationDataAccess.UpdateStudentEducationInfoIntoDatabase(student);
     }
     catch (Exception exception)
     {
         throw exception;
     }
 }
Ejemplo n.º 3
0
 public ActionResult QualificationInfo(StudentEducationalInfo studentEducation)
 {
     try
     {
         if (ModelState.IsValid)
         {
             studentEducationBusinessAccess.InsertStudentEducationInfoIntoDatabase(studentEducation);
             Session["marks"] = (Int32)studentEducation.collegePercentage;
             return(RedirectToAction("DecisionInfo", "Decision"));
         }
         return(View("QualificationInfo"));
     }
     catch (Exception exception)
     {
         return(View("Error"));
     }
 }
Ejemplo n.º 4
0
 public void InsertStudentEducationInfoIntoDatabase(StudentEducationalInfo student)
 {
     try
     {
         using (connection)
         {
             SqlCommand sqlCommand = new SqlCommand("InsertStudentEducationInfoStoredProcedure", connection);
             sqlCommand.CommandType = CommandType.StoredProcedure;
             sqlCommand.Parameters.AddWithValue("@secondarySchoolName", student.secondarySchoolName);
             sqlCommand.Parameters.AddWithValue("@seniorSecondarySchoolName", student.seniorSecondarySchoolName);
             sqlCommand.Parameters.AddWithValue("@collegeName", student.collegeName);
             sqlCommand.Parameters.AddWithValue("@collegePercentage", student.collegePercentage);
             sqlCommand.Parameters.AddWithValue("@studentId", Session["studentId"]);
             connection.Open();
             sqlCommand.ExecuteNonQuery();
         }
     }
     catch (Exception exception)
     {
         throw exception;
     }
 }