private string StrWhere(SYSLogSearch condition) { string where = string.Empty; if (!string.IsNullOrWhiteSpace(condition.keyword)) { where += string.Format(" and (Logs like '%{0}%')", condition.keyword); } return(where); }
public ActionResult GetPage(SYSLogSearch condition) { string where = StrWhere(condition); PageJsonModel <SYSLog> page = new PageJsonModel <SYSLog>(); page.pageIndex = condition.pageIndex; page.pageSize = condition.pageSize; page.strForm = " SYSLog "; page.strSelect = " * "; page.strWhere = where; page.strOrder = "ID desc"; page.LoadList(); return(Json(page.pageResponse, JsonRequestBehavior.AllowGet)); }