Esempio n. 1
0
 public async Task<ResultUpdateOutput> UpdateDevice(UpdateDeviceInput input)
 {
     var result = new ResultUpdateOutput
                  {
                      Status = 1
                  };
     try
     {
         if (string.IsNullOrEmpty(input.ClientId))
             input.ClientId = "MSoatVe";
         int test = await _deviceBll.UpdateDevice(input);
         if (test > 0)
             result.Status = 0;
     }
     catch (Exception ex)
     {
         ErrorStore.LogExceptionWithoutContext(ex);
     }
  
     return result;
 }
Esempio n. 2
0
 public Task<int> UpdateDevice(UpdateDeviceInput input)
 {
     Mapper.CreateMap<UpdateDeviceInput, Device>();
     int result = _deviceTable.Update(Mapper.Map<Device>(input));
     if (result > 0)
         _requestDeviceTable.UpdateRequestDeviceStatus(input.ClientId, input.DeviceKey, true);
     return Task.FromResult(result);
 }