Beispiel #1
0
        private async void btnGetDeviceCommands_ClickAsync(object sender, EventArgs e)
        {
            Initialize();

            APIDeviceCommandRequestModels.GetDeviceCommandsList model = new APIDeviceCommandRequestModels.GetDeviceCommandsList();
            model.LoadDevice = true;

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

            APIDeviceCommandResponseModels.GetDeviceCommandsList cmds = await uow.DeviceCommandsService.GetDevicesListAsync(model);

            gv1.DataSource = cmds.DeviceCommands;
        }
        public async Task <APIDeviceCommandResponseModels.GetDeviceCommandsList> GetDevicesListAsync(APIDeviceCommandRequestModels.GetDeviceCommandsList rm)
        {
            string strResult = await HttpPost("/api/DeviceCommands/GetDeviceCommandsList", JsonConvert.SerializeObject(rm));

            APIDeviceCommandResponseModels.GetDeviceCommandsList result = (APIDeviceCommandResponseModels.GetDeviceCommandsList)JsonConvert.DeserializeObject(strResult, typeof(APIDeviceCommandResponseModels.GetDeviceCommandsList));
            return(result);
        }