private void SaveValueInDeviceStatusLastRecord(int id) { if (id <= 0) { return; } #if DEBUG if (this.IPAddress == "localhost/monitoring/17.18") { try { channel.AddNewDeviceStatusLastRecord("192.168.17.18", id); } catch (Exception ex) { logger.LogException(LogLevel.Info, string.Format("SaveDeviceStatus.SaveValueInDeviceStatusLastRecord.{0}", this.IPAddress), ex); return; } } if (this.IPAddress == "localhost/monitoring/17.19") { try { channel.AddNewDeviceStatusLastRecord("192.168.17.19", id); } catch (Exception ex) { logger.LogException(LogLevel.Info, string.Format("SaveDeviceStatus.SaveValueInDeviceStatusLastRecord.{0}", this.IPAddress), ex); return; } } #endif #if RELEASE try { channel.AddNewDeviceStatusLastRecord(IPAddress, id); } catch (Exception ex) { logger.LogException(LogLevel.Info, string.Format("SaveDeviceStatus.SaveValueInDeviceStatusLastRecord.{0}", this.IPAddress), ex); } #endif }