public async Task <bool> SaveDeviceSettingInfoAsync() { using (var proxy = new MogamiApiServiceClient()) { await proxy.LoadDeviceSettingAsync(); if (this.DeviceSettingInfo == null) { this._DeviceSettingInfo = new DeviceSettingInfo(); } var req = new REQUEST_SAVEDEVICRSETTING(); var json = JsonConvert.SerializeObject(this.DeviceSettingInfo, Formatting.None); req.Data = json; var rsp = await proxy.SaveDeviceSettingAsync(req); return(rsp.Success); } }
public async Task <bool> LoadDeviceSettingInfoAsync() { if (this.DeviceSettingInfo == null) { this._DeviceSettingInfo = new DeviceSettingInfo(); } using (var proxy = new MogamiApiServiceClient()) { await proxy.LoginAsync(); var rsp = await proxy.LoadDeviceSettingAsync(); if (rsp.Data != null) { JsonConvert.PopulateObject(rsp.Data, this.DeviceSettingInfo); } LoadedDeviceSetting(); } return(true); }