/// <summary> /// Return the number of notifications that are direct to: /// 1. the couple user-roles different by role in input. /// 2. user /// </summary> /// <returns></returns> public static int GetNumberNotifyOtherRoles(string idPeople, string idGroup) { int count = 0; try { DocsPaDB.Query_DocsPAWS.NotificationDB notificationDB = new DocsPaDB.Query_DocsPAWS.NotificationDB(); count = notificationDB.GetNumberNotificationOtherRoles(idPeople, idGroup); } catch (Exception e) { logger.Debug("Errore in BusinessLogic.ServiceNotification.Notification - metodo: GetNumberNotifyOtherRoles ", e); } return(count); }
/// <summary> /// removes the notification with idNotification selected for delete from front end /// </summary> /// <param name="notification"></param> /// <returns></returns> public static bool RemoveNotifications(List <DocsPaVO.Notification.Notification> listNotifications) { bool res = false; try { DocsPaDB.Query_DocsPAWS.NotificationDB notificationDB = new DocsPaDB.Query_DocsPAWS.NotificationDB(); res = notificationDB.RemoveNotifications(listNotifications); } catch (Exception e) { logger.Debug("Errore in BusinessLogic.Notification - metodo: RemoveNotifications ", e); } return(res); }
/// <summary> /// Salva/Svuota la nota nella notifica /// </summary> /// <param name="idPeople"></param> /// <param name="idGroup"></param> /// <param name="date"></param> /// <returns></returns> public static bool UpdateNoteNotification(string idNotify, string note) { bool result = false; try { DocsPaDB.Query_DocsPAWS.NotificationDB notificationDB = new DocsPaDB.Query_DocsPAWS.NotificationDB(); result = notificationDB.UpdateNoteNotification(idNotify, note); } catch (Exception e) { logger.Debug("Errore in BusinessLogic.ServiceNotifications.Notification - metodo: RemoveNoteNotification ", e); } return(result); }
/// <summary> /// Return the list of notifications that are directed to: /// 1. the couple user role. /// 2. user /// </summary> /// <returns></returns> public static List <DocsPaVO.Notification.Notification> ReadNotifications(string idPeople, string idGroup) { List <DocsPaVO.Notification.Notification> listNotifications = new List <DocsPaVO.Notification.Notification>(); try { DocsPaDB.Query_DocsPAWS.NotificationDB notificationDB = new DocsPaDB.Query_DocsPAWS.NotificationDB(); listNotifications = notificationDB.ReadNotifications(idPeople, idGroup); } catch (Exception e) { logger.Debug("Errore in BusinessLogic.ServiceNotifications.Notification - metodo: ReadNotifications ", e); } return(listNotifications); }
/// <summary> /// Rimuove le notifiche di trasmissioni che non necessitano accettazione antecedenti la data specificata /// </summary> /// <param name="idObject"></param> /// <param name="filter"></param> /// <returns></returns> public static bool RemoveNotificationOfTransmissionNoWF(string idPeople, string idGroup, string date) { bool result = false; try { DocsPaDB.Query_DocsPAWS.NotificationDB notificationDB = new DocsPaDB.Query_DocsPAWS.NotificationDB(); result = notificationDB.RemoveNotificationOfTransmissionNoWF(idPeople, idGroup, date); } catch (Exception e) { logger.Debug("Errore in BusinessLogic.ServiceNotifications.Notification - metodo: RemoveNotificationOfTransmissionNoWF ", e); } return(result); }
public static string GetNoticeDaysNotification(string idAmm) { string noticeDays = string.Empty; try { DocsPaDB.Query_DocsPAWS.NotificationDB notificationDB = new DocsPaDB.Query_DocsPAWS.NotificationDB(); noticeDays = notificationDB.GetNoticeDaysNotification(idAmm); } catch (Exception e) { logger.Debug("Errore in BusinessLogic.ServiceNotifications.Notification - metodo: GetDocumentByNotificationsFilters ", e); } return(noticeDays); }
/// <summary> /// Prende l'id delle trasmissioni singole con workflow in attesa di accettazione/rifiuto /// </summary> /// <param name="idSpecializedObject"></param> /// <param name="idPeople"></param> /// <returns></returns> public static List <string> GetIdTrasmPendingByNotificationsFilters(string[] idSpecializedObject, string idPeople) { List <string> listIdSpecializedObject = new List <string>(); try { DocsPaDB.Query_DocsPAWS.NotificationDB notificationDB = new DocsPaDB.Query_DocsPAWS.NotificationDB(); listIdSpecializedObject = notificationDB.GetIdTrasmPendingByNotificationsFilters(idSpecializedObject, idPeople); } catch (Exception e) { logger.Debug("Errore in BusinessLogic.ServiceNotifications.Notification - metodo: GetDocumentByNotificationsFilters ", e); } return(listIdSpecializedObject); }
public static List <string> GetDocumentByNotificationsFilters(string[] idObject, DocsPaVO.Notification.NotificationsFilters filter) { List <string> listIdObject = new List <string>(); try { DocsPaDB.Query_DocsPAWS.NotificationDB notificationDB = new DocsPaDB.Query_DocsPAWS.NotificationDB(); listIdObject = notificationDB.GetDocumentByNotificationsFilters(idObject, filter); } catch (Exception e) { logger.Debug("Errore in BusinessLogic.ServiceNotifications.Notification - metodo: GetDocumentByNotificationsFilters ", e); } return(listIdObject); }
/// <summary> /// Change the notification status from unread to read /// </summary> /// <returns></returns> public static bool ChangeStateReadNotification(DocsPaVO.Notification.Notification notify, bool isNotEnabledSetDataVistaGrd) { bool res = false; try { DocsPaDB.Query_DocsPAWS.NotificationDB notificationDB = new DocsPaDB.Query_DocsPAWS.NotificationDB(); res = notificationDB.ChangeStateReadNotification(notify, isNotEnabledSetDataVistaGrd); } catch (Exception e) { logger.Debug("Errore in BusinessLogic.ServiceNotifications.Notification - metodo: ChangeStateReadNotification ", e); } return(res); }
public static List <DocsPaVO.Notification.Notification> ReadNotificationsMobile(string idPeople, string idGroup, int requestedPage, int pageSize, out int totalRecordCount) { totalRecordCount = 0; List <DocsPaVO.Notification.Notification> listNotifications = new List <DocsPaVO.Notification.Notification>(); try { DocsPaDB.Query_DocsPAWS.NotificationDB notificationDB = new DocsPaDB.Query_DocsPAWS.NotificationDB(); listNotifications = notificationDB.ReadNotificationsMobile(idPeople, idGroup, requestedPage, pageSize, out totalRecordCount); } catch (Exception e) { logger.Debug("Errore in BusinessLogic.ServiceNotifications.Notification - metodo: ReadNotifications ", e); } return(listNotifications); }
/// <summary> /// Aggiorna le notifiche legate all'system id del documento/fascicolo in base alle modifiche subite da quest'ultimo /// </summary> /// <param name="infoUtente"></param> /// <param name="typeOperation"></param> /// <param name="idObject"></param> /// <param name="domainObject"></param> /// <returns></returns> public static bool ModifyNotifications(InfoUtente infoUtente, TypeOperation[] typeOperation, string idObject, string domainObject) { bool result = false; try { DocsPaDB.Query_DocsPAWS.NotificationDB notificationDB = new DocsPaDB.Query_DocsPAWS.NotificationDB(); List <DocsPaVO.Notification.Notification> notificationList = notificationDB.GetNotificationsByIdObject(idObject, domainObject); if (notificationList != null && notificationList.Count > 0) { DocsPaVO.documento.SchedaDocumento schedaDoc = null; DocsPaVO.fascicolazione.Fascicolo project = null; if (notificationList[0].DOMAINOBJECT.Equals(ListDomainObject.DOCUMENT)) { schedaDoc = Documenti.DocManager.getDettaglioPerNotificaAllegati(infoUtente, notificationList[0].ID_OBJECT, notificationList[0].ID_OBJECT); } else if (notificationList[0].DOMAINOBJECT.Equals(ListDomainObject.FOLDER)) { project = Fascicoli.FascicoloManager.getFascicoloById(notificationList[0].ID_OBJECT, infoUtente); } DocsPaVO.Notification.Notification newNotification = ExecuteChangeItems(infoUtente, typeOperation, notificationList[0], schedaDoc, project); foreach (DocsPaVO.Notification.Notification notification in notificationList) { //Tutte le notifiche relative ad un documento o fascicolo hanno i valori dei campi item uguali notification.ITEMS = newNotification.ITEMS; //Le notifiche relative ad un documento o fascicolo posso avere ITEM_SPECIALIZED diverso(esempio note individuali o generali) notification.ITEM_SPECIALIZED = ExecuteChangeSpecializedItem(infoUtente, typeOperation, notification, schedaDoc, project).ITEM_SPECIALIZED; } result = notificationDB.UpdateNotifications(notificationList); } } catch (Exception e) { logger.Debug("Errore in BusinessLogic.ServiceNotifications.Notification - metodo: ModifyNotification ", e); } return(result); }
/// <summary> /// /// </summary> /// <returns></returns> public static bool CheckNotification(DocsPaVO.Notification.Notification notification) { bool res = false; try { DocsPaDB.Query_DocsPAWS.NotificationDB notificationDB = new DocsPaDB.Query_DocsPAWS.NotificationDB(); if (notification.MULTIPLICITY.Equals(DocsPaVO.Notification.Multiplicity.ONE)) { res = notificationDB.CheckNotification(notification.ID_EVENT, string.Empty, notification.ID_GROUP); } else { res = notificationDB.CheckNotification(notification.ID_EVENT, notification.ID_PEOPLE, notification.ID_GROUP); } } catch (Exception e) { logger.Debug("Errore in BusinessLogic.ServiceNotifications.Notification - metodo: CheckNotification ", e); } return(res); }
public static bool Follow(DocsPaVO.Notification.FollowDomainObject followObject) { DocsPaDB.Query_DocsPAWS.NotificationDB notificationDB = new DocsPaDB.Query_DocsPAWS.NotificationDB(); return(notificationDB.FollowDomainObjectManager(followObject)); }