Exemplo n.º 1
0
 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);
 }
Exemplo n.º 2
0
        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));
        }