Пример #1
0
        public void listNotifications(object StateObj)
        {
            int pageIndex = 1;
            int pageSize = 10;
            Notifications oNotifications = new Notifications(clientApiKey);
            string strNotifications = oNotifications.searchNotifications(pageSize, pageIndex);

            Clients.Caller.showAlerts(strNotifications, 0);
        }
Пример #2
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="StateObj"></param>
        public void listNotificationsThread(object StateObj)
        {
            StateObjClass State = (StateObjClass)StateObj;
            /*clientInfo oClient = new clientInfo();
            oClient = oClients.FindAll(clientInfo => clientInfo.idUser == State.clientId)[0];*/

            int pageIndex = 1;
            int pageSize = 10;
            Notifications oNotifications = new Notifications(State.clientApiKey);
            string strNotifications = oNotifications.searchNotifications(pageSize, pageIndex, 0, State.searchfromDate);

            //actualizar la hora de cada notificacion del lado del cliente. al hacer click sobre el icono de notificaciones

            if (strNotifications != "{\"ListNotificationsJsonResult\":\"[]\"}")
            {
                Clients.Caller.showAlerts(strNotifications, 1);
                //actualizar la fecha searchfromDate para que el trhead devuelva sólo los nuevos eventos.
                State.searchfromDate = DateTime.Now.AddSeconds(10).ToString("yyyyMMdd HH:mm:ss");
            }
        }
Пример #3
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="iNotificationCode"></param>
 /// <param name="clientApiKey"></param>
 public void readnotification(string iNotificationCode, string clientApiKey)
 {
     Notifications oNotification = new Notifications(clientApiKey);
     oNotification.NotificationViewed(iNotificationCode);
     Clients.Caller.ReadNotificationReturn("");
 }
Пример #4
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="clientApiKey"></param>
 /// <param name="pageIndex"></param>
 /// <param name="pageSize"></param>
 public void listNotifications(string clientApiKey, int pageIndex, int pageSize)
 {
     Notifications oNotifications = new Notifications(clientApiKey);
     string strNotifications = oNotifications.searchNotifications(pageSize, pageIndex);
     Clients.Caller.showAlerts(strNotifications,0);
 }
Пример #5
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="clientApiKey"></param>
 public void viewAllNotifications(string clientApiKey)
 {
     Notifications oNotifications = new Notifications(clientApiKey);
     oNotifications.viewAllNotifications();
 }