public int createNewEventLogAndTriggerExistingAlerts(string customAlertMsg)
        {
            int newEventID = 0;

            try
            {
                newEventID = createNewEventLog(this.MSEvent);
                if (newEventID > 0)
                {
                    this.MSEvent.setEventID(newEventID);
                    EventAlertsHelper eaHelper = new EventAlertsHelper();
                    eaHelper.sendAlertsForEvent(newEventID, customAlertMsg);
                }
                else
                {
                    throw new Exception("Error: Create New Log and Send Alert failed.)");
                }
            }
            catch (Exception ex)
            {
                string strErr = " Exception Error in MainScheduleEventLogger LogEventAndTriggerExistingAlerts(). Details: " + ex.ToString();
                ErrorLogging.WriteEvent(strErr, EventLogEntryType.Error);
                throw ex;
            }

            return(newEventID);
        }
 public void TriggerExistingAlertForEvent(int EventID, string customAlertMsg)
 {
     try
     {
         EventAlertsHelper eaHelper = new EventAlertsHelper();
         eaHelper.sendAlertsForEvent(EventID, customAlertMsg);
     }
     catch (Exception ex)
     {
         string strErr = " Exception Error in MainScheduleEventLogger TriggerExistingAlertForEvent(). Details: " + ex.ToString();
         ErrorLogging.WriteEvent(strErr, EventLogEntryType.Error);
         throw ex;
     }
 }