Пример #1
0
 public static DataTable GetStudentDetails(ExamModel emodel)
 {
     SqlParameter[] param =
     {
         new SqlParameter("@SID", emodel.SID),
         new SqlParameter("@CID", emodel.CID)
     };
     return(SqlHelper.ExecuteDataset(SqlHelper.Connect, CommandType.Text, "select Students.*,Classes.ClassName,sections.SectionName,studentinfo.* from StudentInfo inner join students on students.StudentID=StudentInfo.StudentId inner join Classes on Classes.ClassId=StudentInfo.ClassID inner join Sections on Sections.SectionID=StudentInfo.SectionID where StudentInfo.ClassID=@CID and StudentInfo.StudentId=@SID", param).Tables[0]);
 }
Пример #2
0
        public static DataTable GetAllSeriesByClass(ExamModel emodel)
        {
            SqlParameter[] param =
            {
                new SqlParameter("@SID", Convert.ToInt64(emodel.SID)),
                new SqlParameter("@CID", Convert.ToInt64(emodel.CID))
            };

            return(SqlHelper.ExecuteDataset(SqlHelper.Connect, CommandType.Text, "select OnlineResult.*,QuestionSeries.*,Subjects.* from OnlineResult inner join QuestionSeries on QuestionSeries.SID=OnlineResult.SeriesIDFK inner join Subjects on Subjects.SubjectID=QuestionSeries.SubjectIDFK  where OnlineResult.SIDFK=@SID and QuestionSeries.ClassIDFK=@CID and QuestionSeries.IsPublished=1 order by QuestionSeries.PublishDate desc", param).Tables[0]);
        }