/// <summary>
 /// Add a new term to given YearClassSection with given percentage
 /// </summary>
 /// <param name="termId">Id of term to be added</param>
 /// <param name="yearId">Id of corresponding year entry</param>
 /// <param name="classId">Id of corresponding class entry</param>
 /// <param name="sectionId">Id of corresponding section entry</param>
 /// <param name="percentage">percentage of mark of given term that will contribute in final result</param>
 /// <returns>Number of entries added</returns>
 public int AddTermYearClassSection(string termId, string yearId, string classId, string sectionId, string percentage)
 {
     return(AddTermYearClassSection(
                Convert.ToInt32(termId),
                YCSTable.GetYearClassSectionId(yearId, classId, sectionId),
                Convert.ToInt32(percentage)
                ));
 }
        public List <Student> GetStudents(object yearId, object classId, object sectionId)
        {
            var YCSId = YCSTable.GetYearClassSectionId(yearId, classId, sectionId);

            return(db.Query("getStudentByYCSId", new Dictionary <string, object>()
            {
                { "@YCSId", YCSId }
            }, true).
                   Select(x => new Student {
                FirstName = x["firstname"],
                LastName = x["lastname"],
                Roll = int.Parse(x["roll"]),
                ID = x["studentid"]
            }).ToList());
        }
 /// <summary>
 /// Add a new teacherSubject entry
 /// </summary>
 /// <param name="teacherId">Id of correspondint teacher</param>
 /// <param name="subjectId">Id of correspondint subject</param>
 /// <param name="yearId">Id of corresponding year entry</param>
 /// <param name="classId">Id of corresponding class entry</param>
 /// <param name="sectionId">Id of corresponding section entry</param>
 /// <returns>Id of newly added teacherSubject entry</returns>
 public int AddTeacherSubject(object teacherId, object subjectId, object yearId, object classId, object sectionId)
 {
     return(AddTeacherSubject(teacherId, subjectId, yearClassSectionTable.GetYearClassSectionId(yearId, classId, sectionId)));
 }