//------------------------------------------------------------------------------ public virtual void GetAppListByUuid() { string _uuid = (string)util.GetParamValue(_context, "uuid"); ResponseAppList wrapper = new ResponseAppList(); wrapper.message = "Success"; wrapper.code = 0; wrapper.action = "app/get/by-uuid"; List<App> objs = api.GetAppListByUuid( _uuid ); // get data wrapper.data = objs; util.SerializeTypeToResponse(_format, _context, wrapper); }
//------------------------------------------------------------------------------ public virtual void GetAppList() { ResponseAppList wrapper = new ResponseAppList(); wrapper.message = "Success"; wrapper.code = 0; wrapper.action = "app/get"; List<App> objs = api.GetAppList( ); // get data wrapper.data = objs; util.SerializeTypeToResponse(_format, _context, wrapper); }
//------------------------------------------------------------------------------ public virtual void GetAppListByPlatformByTypeId() { string _platform = (string)util.GetParamValue(_context, "platform"); string _type_id = (string)util.GetParamValue(_context, "type_id"); ResponseAppList wrapper = new ResponseAppList(); wrapper.message = "Success"; wrapper.code = 0; wrapper.action = "app/get/by-platform/by-type-id"; List<App> objs = api.GetAppListByPlatformByTypeId( _platform , _type_id ); // get data wrapper.data = objs; util.SerializeTypeToResponse(_format, _context, wrapper); }
//------------------------------------------------------------------------------ public virtual void BrowseAppListByFilter() { ResponseAppList wrapper = new ResponseAppList(); wrapper.message = "Success"; wrapper.code = 0; wrapper.action = "app/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"); AppResult result = api.BrowseAppListByFilter(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); }