public void SpeakNotification(string notificationId) { isSpeaking = true; DAL_Notification dalNotify = new DAL_Notification(); string content = dalNotify.GetNotification(notificationId); APIUtils.TextToSpeech.Speak(content); }
public void GetCountNotificationsUnread() { string userID = ((Trinity.BE.User)Session.Instance[CommonConstants.USER_LOGIN]).UserId; List <string> modules = new List <string>() { EnumStation.APS, EnumStation.ARK, EnumStation.ALK, EnumStation.SHP, EnumStation.SSP, EnumStation.ENROLMENT }; int count = new DAL_Notification().GetCountNotificationsUnread(userID, modules, true); this._web.InvokeScript("setCountMessage", count); }
public void ChangeReadStatus(string notificationId) { try { var dalNotify = new DAL_Notification(); dalNotify.ChangeReadStatus(notificationId); } catch (Exception ex) { return; } }
public bool updateReadedStatus(string NotificationID) { var dalNotify = new DAL_Notification(); string userID = ((Trinity.BE.User)Session.Instance[CommonConstants.USER_LOGIN]).UserId; if (userID != null || userID != "") { Response <bool> response = dalNotify.updateReadStatus(NotificationID, true); Trinity.SignalR.Client.Instance.DOReadMessage(NotificationID); return(response.ResponseCode == (int)EnumResponseStatuses.Success); } return(false); }
public void LoadNotications() { Session currentSession = Session.Instance; Trinity.BE.User user = getSuperviseeLogin(); DAL_Notification dalNotification = new DAL_Notification(); List <Trinity.BE.Notification> myNotifications = dalNotification.GetAllNotifications(user.UserId); var model = myNotifications; _web.LoadPageHtml("Notifications.html", myNotifications); }
private void LoadNotifications() { DAL_Notification dalNotification = new DAL_Notification(); List <Notification> notifications = dalNotification.GetNotificationsSentToDutyOfficer(true); if (notifications != null && notifications.Count > 0) { dgvNotifications.Rows.Clear(); notifications = notifications.OrderBy(n => n.Datetime).ToList(); for (int i = 0; i < notifications.Count; i++) { dgvNotifications.Rows.Insert(0, 1); dgvNotifications[colFromUserName.Index, 0].Value = notifications[i].FromUserName; dgvNotifications[ColSubject.Index, 0].Value = notifications[i].Subject; dgvNotifications[ColContent.Index, 0].Value = notifications[i].Content; dgvNotifications[ColDate.Index, 0].Value = notifications[i].Datetime.Value.ToString("dd/MM/yyyy HH:mm"); } } }
public List <Notification> getAlertsSendToDutyOfficer() { if (_isFocusQueue) { SmartCardReaderUtil.Instance.StopSmartCardMonitor(); _isFocusQueue = false; } var dalNotify = new DAL_Notification(); string userID = ((Trinity.BE.User)Session.Instance[CommonConstants.USER_LOGIN]).UserId; if (userID != null || userID != "") { //Receive alerts and notifications from APS, ARK, ALK, SHP and SSP List <string> modules = new List <string>() { EnumStation.APS, EnumStation.ARK, EnumStation.ALK, EnumStation.SHP, EnumStation.SSP, EnumStation.ENROLMENT }; return(dalNotify.GetAllNotifications(userID, modules, true)); } return(null); }