//------------------------------------------------------------------------------ public virtual void GetContentPageListByUuid() { string _uuid = (string)util.GetParamValue(_context, "uuid"); ResponseContentPageList wrapper = new ResponseContentPageList(); wrapper.message = "Success"; wrapper.code = 0; wrapper.action = "content-page/get/by-uuid"; List<ContentPage> objs = api.GetContentPageListByUuid( _uuid ); // get data wrapper.data = objs; util.SerializeTypeToResponse(_format, _context, wrapper); }
//------------------------------------------------------------------------------ public virtual void GetContentPageList() { ResponseContentPageList wrapper = new ResponseContentPageList(); wrapper.message = "Success"; wrapper.code = 0; wrapper.action = "content-page/get"; List<ContentPage> objs = api.GetContentPageList( ); // get data wrapper.data = objs; util.SerializeTypeToResponse(_format, _context, wrapper); }
//------------------------------------------------------------------------------ public virtual void GetContentPageListBySiteIdByPath() { string _site_id = (string)util.GetParamValue(_context, "site_id"); string _path = (string)util.GetParamValue(_context, "path"); ResponseContentPageList wrapper = new ResponseContentPageList(); wrapper.message = "Success"; wrapper.code = 0; wrapper.action = "content-page/get/by-site-id/by-path"; List<ContentPage> objs = api.GetContentPageListBySiteIdByPath( _site_id , _path ); // get data wrapper.data = objs; util.SerializeTypeToResponse(_format, _context, wrapper); }
//------------------------------------------------------------------------------ public virtual void BrowseContentPageListByFilter() { ResponseContentPageList wrapper = new ResponseContentPageList(); wrapper.message = "Success"; wrapper.code = 0; wrapper.action = "content-page/browse/by-filter"; SearchFilter obj = new SearchFilter(); obj.page = Convert.ToInt32(util.GetParamValue(_context, "page")); obj.page_size = Convert.ToInt32(util.GetParamValue(_context, "page-size")); obj.filter = util.GetParamValue(_context, "filter"); ContentPageResult result = api.BrowseContentPageListByFilter(obj); wrapper.info.Add("total_rows", result.total_rows); wrapper.info.Add("total_pages", result.total_pages); wrapper.info.Add("page", result.page); wrapper.info.Add("page_size", result.page_size); // get data wrapper.data = result.data; util.SerializeTypeToResponse(_format, _context, wrapper); }