public async Task <APIThingResponseModels.GetThingsList> GetThingsListAsync(APIThingRequestModels.GetThingsList rm) { string strResult = await HttpPost("/api/Things/GetThingsList", JsonConvert.SerializeObject(rm)); APIThingResponseModels.GetThingsList result = (APIThingResponseModels.GetThingsList)JsonConvert.DeserializeObject(strResult, typeof(APIThingResponseModels.GetThingsList)); return(result); }
private async void btnThings_Click(object sender, EventArgs e) { Initialize(); APIThingRequestModels.GetThingsList model = new APIThingRequestModels.GetThingsList(); model.LoadEndPoints = true; model.LoadLocation = true; model.LoadThingEnds = true; model.LoadThingExtensionValues = true; model.PageNumber = 1; model.PageSize = 1; model.Token = Guid.Parse(txtToken.Text); APIThingResponseModels.GetThingsList things = await uow.ThingsService.GetThingsListAsync(model); gv1.DataSource = things.Things; }