Example #1
0
 public void AddCatalog(HttpContext context)
 {
     try
     {
         //科目
         Book_CatologService bll     = new Book_CatologService();
         Book_Catolog        catolog = new Book_Catolog();
         catolog.Name      = context.Request["Name"].SafeToString();
         catolog.SubjectID = int.Parse(context.Request["SubID"]);
         catolog.Pid       = int.Parse(context.Request["PID"]);
         JsonModel jsonModel = bll.Add(catolog);
         result = "{\"result\":" + jss.Serialize(jsonModel) + "}";
     }
     catch (Exception ex)
     {
         jsonModel = new JsonModel()
         {
             errNum  = 400,
             errMsg  = ex.Message,
             retData = ""
         };
         LogService.WriteErrorLog(ex.Message);
         return;
     }
 }
Example #2
0
 public void Chapator(HttpContext context)
 {
     try
     {
         //科目
         Book_CatologService bll = new Book_CatologService();
         Hashtable           ht  = new Hashtable();
         ht.Add("SubName", context.Request["SubName"]);
         ht.Add("IsPage", context.Request["IsPage"]);
         ht.Add("VersionID", context.Request["VersionID"]);
         ht.Add("GradeID", context.Request["GradeID"]);
         ht.Add("SubID", context.Request["SubID"]);
         ht.Add("PID", context.Request["PID"]);
         JsonModel jsonModel = bll.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;
     }
 }
Example #3
0
 public void DelCatalog(HttpContext context)
 {
     try
     {
         //科目
         Book_CatologService bll = new Book_CatologService();
         int       ID            = Convert.ToInt32(context.Request["ID"]);
         JsonModel jsonModel     = bll.Delete(ID);
         result = "{\"result\":" + jss.Serialize(jsonModel) + "}";
     }
     catch (Exception ex)
     {
         jsonModel = new JsonModel()
         {
             errNum  = 400,
             errMsg  = ex.Message,
             retData = ""
         };
         LogService.WriteErrorLog(ex.Message);
         return;
     }
 }