public void ProcessRequest(HttpContext context)
 {
     evalCourse evalCourse = new evalCourse();
     JsonModel jsonModel = new JsonModel();
     PagedDataModel<evalCourse> jsonPagedDataModel = new PagedDataModel<evalCourse>();
     jc_Public jcPublic = new jc_Public();
     int totalcount = 0;
     var userId = context.Request.QueryString["userId"];
     var evalStatus = context.Request.QueryString["evalStatus"];
     var PageIndex = context.Request.QueryString["PageIndex"];
     var PageSize = context.Request.QueryString["PageSize"];
     if (string.IsNullOrEmpty(userId) || string.IsNullOrEmpty(evalStatus) || string.IsNullOrEmpty(PageIndex) ||
         string.IsNullOrEmpty(PageSize))
     {
         jsonModel.Status = "0";
         jsonModel.Message = "缺少必要参数!";
     }
     else
     {
         string strWhere = "and u.evalUserId=" + userId + " and u.evalStatus=" + evalStatus;
         string strSql = @" SELECT u.evalUserId, c.evalCourseName, c.evalCourseTeacher,
                          c.evalCourseDate,u.evalStatus,c.evalCourseId, c.evalSurveryId
                         FROM   jc_EvaluateCourseUser u, jc_EvaluateCourse c
                         WHERE  u.evalCourseId = c.evalCourseId ";
         jsonPagedDataModel.PagedData = evalCourse.GetevalCourseList(jcPublic.GetList(strSql + strWhere, "evalUserId",
                int.Parse(PageIndex), int.Parse(PageSize), out totalcount).Tables[0]);
         jsonPagedDataModel.PageCount = totalcount / int.Parse(PageIndex);
         jsonPagedDataModel.PageIndex = int.Parse(PageIndex);
         jsonPagedDataModel.RowCount = totalcount;
         jsonModel.Data = jsonPagedDataModel;
         jsonModel.Status = "1";
         jsonModel.Message = "查询成功!";
     }
     var js = new JavaScriptSerializer();
     context.Response.Write(js.Serialize(jsonModel));
 }
 /// <summary>
 ///     得到一个对象实体
 /// </summary>
 public evalCourse DataRowToModel(DataRow row)
 {
     var model = new evalCourse();
     if (row != null)
     {
         if (row["evalUserId"] != null && row["evalUserId"].ToString() != "")
         {
             model.evalUserId = int.Parse(row["evalUserId"].ToString());
         }
         if (row["evalCourseName"] != null)
         {
             model.evalCourseName = row["evalCourseName"].ToString();
         }
         if (row["evalCourseTeacher"] != null)
         {
             model.evalCourseTeacher = row["evalCourseTeacher"].ToString();
         }
         if (row["evalCourseDate"] != null && row["evalCourseDate"].ToString() != "")
         {
             model.evalCourseDate = DateTime.Parse(row["evalCourseDate"].ToString());
         }
         if (row["evalStatus"] != null && row["evalStatus"].ToString() != "")
         {
             model.evalStatus = int.Parse(row["evalStatus"].ToString());
         }
         if (row["evalCourseId"] != null && row["evalCourseId"].ToString() != "")
         {
             model.evalCourseId = int.Parse(row["evalCourseId"].ToString());
         }
         if (row["evalSurveryId"] != null && row["evalSurveryId"].ToString() != "")
         {
             model.evalSurveryId = int.Parse(row["evalSurveryId"].ToString());
         }
     }
     return model;
 }