示例#1
0
 private string StrWhere(BaseParametersSearch condition)
 {
     string where = string.Empty;
     if (!string.IsNullOrWhiteSpace(condition.keyword))
     {
         where += string.Format(" and (ParametersKey like '%{0}%' or NickName like '%{0}%' or Remark like '%{0}%' or Type like '%{0}%')", condition.keyword);
     }
     return(where);
 }
示例#2
0
        public ActionResult GetPage(BaseParametersSearch condition)
        {
            string where = StrWhere(condition);
            PageJsonModel <BaseParameters> page = new PageJsonModel <BaseParameters>();

            page.pageIndex = condition.pageIndex;
            page.pageSize  = condition.pageSize;
            page.strForm   = " BaseParameters ";
            page.strSelect = " * ";
            page.strWhere  = where;
            page.strOrder  = "Type,Sort";
            page.LoadList();

            return(Json(page.pageResponse, JsonRequestBehavior.AllowGet));
        }