Пример #1
0
        public ActionResult GetListtb_Store(int?page)
        {
            string KeyWord = DNTRequest.GetString("KeyWord");

            int    rows     = DNTRequest.GetInt("rows", 10);
            string strWhere = " 1=1 ";

            if (KeyWord != "")
            {
                strWhere += " and (Name like '%" + KeyWord + "%'  or code like '%" + KeyWord + "%') ";
            }
            int     count = 0;
            DataSet ds    = gb.GetMenushop();

            //string sql = @"select   *  from [" + DBName + @"].[dbo].[tb_Store]  where  " + strWhere;
            //DataSet ds = DataPageHelper.GetDataPage(DataPageHelper.GetPageSql(sql, page.Value, rows, "id desc"), out count);
            List <VUShop> list = TBToList <VUShop> .ConvertToList(ds.Tables[0]).ToList();

            var grid = new EasyuiDataGrid <List <VUShop> >();

            grid.total = count;
            grid.rows  = list;
            return(Json(grid, JsonRequestBehavior.AllowGet));
        }