public List<INotificationGateway> GetNotificationsForTenant(string tenantId, string eventType) { DataAccessHelper dhelper = new DataAccessHelper(); List<INotificationGateway> nGateWays = new List<INotificationGateway>(); var notificationModes = dhelper.GetNotificationModesForTenant(tenantId, eventType); foreach (string nmode in notificationModes) { nGateWays.Add(GetGateway(nmode)); } return nGateWays; }
public bool UpdateNotificationStatus(List<NotificationDetails> notificationDetails, bool IsNotified) { try { DataAccessHelper objDbHelper = new DataAccessHelper(); string tenantId; string fileID; foreach (var nd in notificationDetails) { tenantId = nd.TenantID.ToString(); fileID = nd.FileID.ToString(); if (!string.IsNullOrEmpty(nd.NotificationMode)) { objDbHelper.UpdateNotificationStatus(IsNotified, tenantId, fileID); } } return true; } catch (Exception ex) { //TODO: Log return false; } }