Beispiel #1
0
        public DtoActionResult UpdateComputerRemoteAccessId(DtoRemotelyConnectionInfo conInfo, string clientIdentity)
        {
            var client = _uow.ComputerRepository.GetFirstOrDefault(x => x.Guid == clientIdentity);

            if (client == null)
            {
                return new DtoActionResult()
                       {
                           ErrorMessage = "Client Not Found", Success = false
                       }
            }
            ;
            client.RemoteAccessId = conInfo.DeviceID;
            _uow.ComputerRepository.Update(client, client.Id);
            _uow.Save();
            return(new DtoActionResult()
            {
                Success = true, Id = client.Id
            });
        }
Beispiel #2
0
        public DtoActionResult UpdateRemoteAccessId(DtoRemotelyConnectionInfo conInfo)
        {
            var clientGuid = RequestContext.Principal.Identity.Name;

            return(new ServiceRemoteAccess().UpdateComputerRemoteAccessId(conInfo, clientGuid));
        }