Example #1
0
        private void ManageError(Exception inExc, DeviceActivityLogModel errValue)
        {
            var errdata = new TbUdlog();

            errdata.Indata         = errValue.ToString() + "<<-- Error : " + inExc.Message + " Stack Track : " + inExc.StackTrace + "-->>";
            errdata.ServerDateTime = DateTime.Now;
            errdata.Id             = Guid.NewGuid().ToString();
            _context.TbUdlog.Add(errdata);
        }
Example #2
0
        public void SetCurrentActivity(DeviceActivityLogModel inLog)
        {
            var tmpMn = _thing.First(x => x.Id.Contains(inLog.MachineID));
            var tmpPt = tmpMn.ThingPortsStatus.First(x => x.IoTdevicePortID.Contains(inLog.DevicePort.ToString()));

            if (tmpPt != null)
            {
                tmpPt.Value = inLog.SensorValue;
                tmpPt.LastUpdateDateTime = inLog.ClientDateTime;
            }
            //_thing.Add(inLog);
        }