public void WatchOwnerCurrentSituation(WatchOwner i_WatchOwnerInRedAlertZone, eWatchOwnerCurrentSituation i_WatchOwnerCurrentSituation) { EngineFacade.Instance.NotifyAllContactsOfTheUserAboutItsCurrentSituation(i_WatchOwnerInRedAlertZone, i_WatchOwnerCurrentSituation); }
public void NotifyAllContactsOfTheUserAboutItsCurrentSituation(WatchOwner i_WatchOwnerInRedAlertZone, eWatchOwnerCurrentSituation i_WatchOwnerCurrentSituation) { string messageSubject = null; string messageBody = null; switch (i_WatchOwnerCurrentSituation) { case eWatchOwnerCurrentSituation.INHM: messageSubject = i_WatchOwnerInRedAlertZone.Name + " NEEDS HELP!"; messageBody = i_WatchOwnerInRedAlertZone.Name + " is in red alert zone and needs help!" + Environment.NewLine + "Please contact him immidatly!"; break; case eWatchOwnerCurrentSituation.IOKM: messageSubject = i_WatchOwnerInRedAlertZone.Name + " is OK"; messageBody = i_WatchOwnerInRedAlertZone.Name + " is in red alert zone and he is OK"; break; } m_EmailSender.SendMessage(i_WatchOwnerInRedAlertZone.MakeMailMessageToWatchOwnerContacts(messageSubject, messageBody)); }