private string StrWhere(j_jflogSearch condition) { string where = string.Empty; if (!string.IsNullOrWhiteSpace(condition.keyword)) { where += string.Format(" and (logContents like '%{0}%' or UserName like '%{0}%' or Code like '%{0}%')", condition.keyword); } return(where); }
public ActionResult GetPage(j_jflogSearch condition) { string where = StrWhere(condition); where += " and Type='兑换' and UserType='消费者' "; PageJsonModel <j_jflog> page = new PageJsonModel <j_jflog>(); page.pageIndex = condition.pageIndex; page.pageSize = condition.pageSize; page.strForm = " j_jflog "; page.strSelect = " * "; page.strWhere = where; page.strOrder = "ID desc"; page.LoadList(); return(Json(page.pageResponse, JsonRequestBehavior.AllowGet)); }