Ejemplo n.º 1
0
        private async void btnGetThingEnds_ClickAsync(object sender, EventArgs e)
        {
            Initialize();

            APIThingEndRequestModels.GetThingEndsList model = new APIThingEndRequestModels.GetThingEndsList();
            model.LoadEndpoint = true;
            model.LoadThing    = true;

            model.PageNumber = 1; model.PageSize = 1; model.Token = Guid.Parse(txtToken.Text);

            APIThingEndResponseModels.GetThingEndsList thingEnds = await uow.ThingEndsService.GetThingEndsListAsync(model);

            gv1.DataSource = thingEnds.ThingEnds;
        }
Ejemplo n.º 2
0
        public async Task <APIThingEndResponseModels.GetThingEndsList> GetThingEndsListAsync(APIThingEndRequestModels.GetThingEndsList rm)
        {
            string strResult = await HttpPost("/api/ThingEnds/GetThingEndsList", JsonConvert.SerializeObject(rm));

            APIThingEndResponseModels.GetThingEndsList result = (APIThingEndResponseModels.GetThingEndsList)JsonConvert.DeserializeObject(strResult, typeof(APIThingEndResponseModels.GetThingEndsList));
            return(result);
        }