Beispiel #1
0
 public void ProcessSystemStatus(DataCenterTypes.SystemStatusType systemStatus)
 {
     using (var ssda = new SystemStatusDataAccess())
     {
         ssda.Create(TypeHelper.Map2DB(systemStatus), 0);
     }
 }
Beispiel #2
0
        public void ProcessAspHeartBeat(Common.HeartBeatMessage aspHb)
        {
            var sda   = new SystemStatusDataAccess();
            var sysst = new SystemStatus();

            sysst.DDPVersionNum = "0";
            sysst.Message       = "ASP OK";
            sysst.MessageId     = "0";
            sysst.MessageType   = 0;
            sysst.Originator    = "ASP";
            sysst.schemaVersion = 0;
            sysst.SystemStatus1 = 0;
            sysst.test          = 0;
            sysst.TimeStamp     = DateTime.UtcNow;

            sda.Create(sysst, 0);
        }
Beispiel #3
0
        /// <summary>
        /// Envia un mensaje de tipo SystemStatus
        /// </summary>
        /// <param name="msg"></param>
        private string SendSystemStatus(Message msg)
        {
            DataCenterLogic.DataCenterTypesIDE.SystemStatusType systemStatus = (DataCenterLogic.DataCenterTypesIDE.SystemStatusType)(msg.Body);

            //Send to IDE
            if (System.Configuration.ConfigurationManager.AppSettings["send2servers"] != "False")
            {
                systemStatus.test = DataCenterLogic.DataCenterTypesIDE.testType.Item0;
                ideClient.SystemStatus(systemStatus);
                log.Info("SendSystemStatus: systemStatus sent to IDE");
            }

            //Guarda el mensaje en la base de datos
            using (var dao = new SystemStatusDataAccess())
            {
                dao.Create(TypeHelper.Map2DB(systemStatus), 1);
            }
            log.Info("SystemStatus stored");

            return(systemStatus.MessageId);
        }