示例#1
0
        private bool Register(string registerId, string deviceId)
        {
            RegistrationDevice registration = new RegistrationDevice();

            registration.Date           = GlobalWebData.ToUniversalTime();
            registration.RegistrationId = registerId;
            registration.DeviceId       = deviceId;
            earthquakeRepository.DbContext.RegistrationDevices.Add(registration);
            earthquakeRepository.Save();
            return(true);
        }
示例#2
0
        public void SaveLog(String log, String deviceId)
        {
            DeviceLog newlog = new DeviceLog();

            newlog.DeviceId = deviceId;
            newlog.Date     = GlobalWebData.ToUniversalTime();
            newlog.Log      = log;
            earthquakeRepository.DbContext.DevicesLogs.Add(newlog);
            earthquakeRepository.Save();
        }