Exemple #1
0
 /// <summary>
 /// 获得科目、教材、教材版本
 /// </summary>
 /// <param name="context"></param>
 public void GetSubJectData(HttpContext context)
 {
     try
     {
         Book_SubjectService SubjectBll = new Book_SubjectService();
         Hashtable           ht         = new Hashtable();
         ht.Add("PageIndex", context.Request["PageIndex"].SafeToString());
         ht.Add("PageSize", context.Request["pageSize"].SafeToString());
         ht.Add("VersionID", context.Request["VersionID"].SafeToString());
         ht.Add("GradeID", context.Request["GradeID"].SafeToString());
         JsonModel jsonModel = SubjectBll.GetPage(ht);
         result = "{\"result\":" + jss.Serialize(jsonModel) + "}";
     }
     catch (Exception ex)
     {
         jsonModel = new JsonModel()
         {
             errNum  = 400,
             errMsg  = ex.Message,
             retData = ""
         };
         LogService.WriteErrorLog(ex.Message);
         return;
     }
 }
Exemple #2
0
 public void GetSubJect(HttpContext context)
 {
     try
     {
         //科目
         Book_SubjectService SubjectBll = new Book_SubjectService();
         Hashtable           ht         = new Hashtable();
         ht.Add("Distinct", context.Request["Distinct"]);
         ht.Add("IsPage", context.Request["IsPage"]);
         ht.Add("VersionID", context.Request["VersionID"]);
         ht.Add("GradeID", context.Request["GradeID"]);
         JsonModel jsonModel = SubjectBll.GetPage(ht, false);
         result = "{\"result\":" + jss.Serialize(jsonModel) + "}";
     }
     catch (Exception ex)
     {
         jsonModel = new JsonModel()
         {
             errNum  = 400,
             errMsg  = ex.Message,
             retData = ""
         };
         LogService.WriteErrorLog(ex.Message);
         return;
     }
 }