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