Ejemplo n.º 1
0
        public void SaveOrUpdateHealthStatus(SelfHealthMessage healthMessage)
        {
            HealthMessageDAO dao = new HealthMessageDAO();

            SelfHealthMessage healthStatus = dao.GetCheckTypeForApp(healthMessage);

            if (healthStatus == null)
            {
                Trace.TraceInformation("Health Status about to save");

                dao.SaveHealthStatus(healthMessage);
                Trace.TraceInformation("Health Status Saved Succesfully");
            }
            else
            {
                Trace.TraceInformation("Health Status about to update");

                dao.UpdateHealthStatus(healthMessage);
                Trace.TraceInformation("Health Status Updated Succesfully");
            }
        }