//------------------------------------------------------------------------------ public virtual void GetCityListByUuid() { string _uuid = (string)util.GetParamValue(_context, "uuid"); ResponseCityList wrapper = new ResponseCityList(); wrapper.message = "Success"; wrapper.code = 0; wrapper.action = "city/get/by-uuid"; List<City> objs = api.GetCityListByUuid( _uuid ); // get data wrapper.data = objs; util.SerializeTypeToResponse(_format, _context, wrapper); }
//------------------------------------------------------------------------------ public virtual void BrowseCityListByFilter() { ResponseCityList wrapper = new ResponseCityList(); wrapper.message = "Success"; wrapper.code = 0; wrapper.action = "city/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"); CityResult result = api.BrowseCityListByFilter(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); }
//------------------------------------------------------------------------------ public virtual void GetCityList() { ResponseCityList wrapper = new ResponseCityList(); wrapper.message = "Success"; wrapper.code = 0; wrapper.action = "city/get"; List<City> objs = api.GetCityList( ); // get data wrapper.data = objs; util.SerializeTypeToResponse(_format, _context, wrapper); }