public ActionResult RemoveSignal(string id) { var excludedSignalRepository = DatabaseArchiveExcludedSignalsRepositoryFactory.Create(); if (!String.IsNullOrEmpty(id) && excludedSignalRepository.Exists(id)) { excludedSignalRepository.DeleteFromExcludedList(id); return(Content("Signal Removed")); } return(Content("Unable to Remove Signal")); }
public ActionResult AddSignal(string id) { var signalRepository = SignalsRepositoryFactory.Create(); if (!String.IsNullOrEmpty(id) && !signalRepository.Exists(id)) { DatabaseArchiveExcludedSignal databaseArchiveExcludedSignal = new DatabaseArchiveExcludedSignal(); databaseArchiveExcludedSignal.SignalId = id; databaseArchiveExcludedSignal.SignalDescription = signalRepository.GetSignalDescription(id); var excludedSignalRepository = DatabaseArchiveExcludedSignalsRepositoryFactory.Create(); excludedSignalRepository.AddToExcludedList(id); return(PartialView("EditorTemplates/DatabaseArchiveExcludedSignal", databaseArchiveExcludedSignal)); } return(Content("Unable to load signal")); }