コード例 #1
0
 public static IList <GradeCourse> GetGradeCourse(int micYear, GradeCode gradeCode)
 {
     using (AppBLL bll = new AppBLL())
     {
         var sql = "SELECT a.Academicyear,a.GradeNo, a.CourseCode, b.FullName"
                   + " FROM  tbCourseUse a LEFT OUTER JOIN"
                   + " tdCourseCode b ON a.coursecode = b.CourseCode"
                   + " where a.Academicyear=@micYear"
                   + " and a.GradeNo=@gradeNo";
         return(bll.FillListByText <GradeCourse>(sql, new { micYear = micYear, gradeNo = gradeCode.GradeNo }));
     }
 }
コード例 #2
0
 public static IList <GradeCourse> GetGradeCourse(GradeCode gradeCode, int flag)
 {
     using (AppBLL bll = new AppBLL())
     {
         var sql = "SELECT a.Academicyear,a.GradeNo, a.CourseCode, b.FullName" +
                   " FROM  tbCourseUse a LEFT OUTER JOIN" +
                   " tdCourseCode b ON a.coursecode = b.CourseCode" +
                   " where (@flag=-1 or b.IsDownLoad = @flag)" +
                   " and a.GradeNo=@gradeNo" +
                   " group by a.Academicyear,a.gradeno,a.coursecode, b.FullName";
         return(bll.FillListByText <GradeCourse>(sql, new { gradeNo = gradeCode.GradeNo, flag = flag }));
     }
 }
コード例 #3
0
 public static IList <GradeClass> GetGradeClass(int academicYear, GradeCode gradeCode)
 {
     try
     {
         using (AppBLL bll = new AppBLL())
         {
             var sql = "select a.SystemID, a.GradeNo, AcadEmicYear, ClassNo, ClassType, IsDelete,b.GradeName, b.GradeBriefName from tbGradeClass a, tdGradeCode b" +
                       " where a.Gradeno=b.GradeNO" +
                       " and a.GradeNO=@gradeCode" +
                       " and a.AcadEmicYear=@micYear";
             return(bll.FillListByText <GradeClass>(sql, new { micYear = academicYear, gradeCode = gradeCode.GradeNo }));
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
コード例 #4
0
 public static IList <TestType> GetTestTypeByCourse(int micYear, GradeCourse gradeCourse, GradeCode gradeCode)
 {
     using (AppBLL bll = new AppBLL())
     {
         var sql = " SELECT a.TestType as Code, b.TypeName as Name"
                   + " FROM s_tb_testlogin a INNER JOIN"
                   + " s_tb_TestTypeInfo b ON a.TestType = b.TestType"
                   + " where a.AcademicYear=@micYear"
                   + " and a.coursecode in ('00000', @courseCode)"
                   + " and a.GradeNo in ('00',@gradeNo)"
                   + " group by a.testtype,b.typename "
                   + " order by a.testtype ";
         return(bll.FillListByText <TestType>(sql, new { micYear = micYear, courseCode = gradeCourse.CourseCode, gradeNo = gradeCode.GradeNo }));
     }
 }