Exemplo n.º 1
0
 public ActionResult GridTeacherMessagetPageJson(string KeyValue, JqGridParam jqgridparam)
 {
     try
     {
         Stopwatch watch          = CommonHelper.TimerStart();
         DataTable resultListData = bull.GetTeacherPageList(KeyValue, ref jqgridparam);
         DataTable ListData       = new DataTable();
         ListData = resultListData.Clone();
         foreach (DataRow row in resultListData.Rows)
         {
             DataRow rowNew = ListData.NewRow();
             rowNew["ID"]           = row["ID"];
             rowNew["UserName"]     = row["UserName"];
             rowNew["UserCode"]     = row["UserCode"];
             rowNew["UserPassword"] = DESEncrypt.Decrypt(row["UserPassword"].ToString());
             rowNew["UserLeavel"]   = row["UserLeavel"];
             rowNew["CreateTime"]   = row["CreateTime"];
             rowNew["UpdateTime"]   = row["UpdateTime"];
             rowNew["Remark"]       = row["Remark"];
             rowNew["UserState"]    = row["UserState"];
             ListData.Rows.Add(rowNew);
         }
         var JsonData = new
         {
             total    = jqgridparam.total,
             page     = jqgridparam.page,
             records  = jqgridparam.records,
             costtime = CommonHelper.TimerEnd(watch),
             rows     = ListData,
         };
         return(Content(JsonData.ToJson()));
     }
     catch (Exception ex)
     {
         Base_SysLogBll.Instance.WriteLog("", OperationType.Query, "-1", "Òì³£´íÎó£º" + ex.Message);
         return(null);
     }
 }