public DtoApiStringResponse UpdateWebRtc(DtoWebRtc webRtc) { var result = new ServiceRemoteAccess().UpdateWebRtc(webRtc.DeviceId, webRtc.Mode); return(new DtoApiStringResponse() { Value = result }); }
public string UpdateWebRtc(DtoWebRtc webRtc) { _request.Method = Method.POST; _request.Resource = string.Format("{0}/UpdateWebRtc/", _resource); _request.AddJsonBody(webRtc); var response = new ApiRequest().Execute <DtoApiStringResponse>(_request); if (response != null) { return(response.Value); } else { return(null); } }
protected void chkWebRtc_CheckedChanged(object sender, EventArgs e) { if (!string.IsNullOrEmpty(ComputerEntity.RemoteAccessId)) { var webRtc = new DtoWebRtc(); webRtc.DeviceId = ComputerEntity.RemoteAccessId; if (chkWebRtc.Checked) { webRtc.Mode = "1"; } else { webRtc.Mode = "2"; } var updateWebRtc = Call.RemoteAccessApi.UpdateWebRtc(webRtc); PopulateForm(); } }