public void TEST_CreateNotificationToPersons() { string Formato = "File_{0}"; NotificationToPerson notification = new NotificationToPerson(); notification.ActionID = 70007; notification.CommunityID = 1; notification.ModuleCode = "SRVMATER"; notification.ModuleID = 1; notification.SentDate = DateTime.Now; notification.PersonsID.Add(1); notification.PersonsID.Add(2); notification.PersonsID.Add(3); notification.PersonsID.Add(4); notification.ValueParameters = new List <string>(); notification.ValueParameters.Add(""); notification.ValueParameters.Add(""); notification.ValueParameters.Add("Facoltà di Economia"); notification.NotificatedObjects = new List <dtoNotificatedObject>(); notification.NotificatedObjects.Add(new dtoNotificatedObject() { FullyQualiFiedName = "file", ModuleCode = "SRVMATER", ModuleID = 1, ObjectID = "1", ObjectTypeID = 1 }); for (int i = 0; i < 1; i++) { notification.SentDate = notification.SentDate.AddHours(1); notification.ValueParameters[1] = string.Format(Formato, i); notification.ValueParameters[0] = notification.ValueParameters[1] + ".download"; this.SendNotificationToPerson(notification); } }
public void NotifyToUsers(NotificationToPerson Notification) { try { using (ISession currentSession = BasicSessionMgr.GetSession()) { if (currentSession != null) { NotificationRepository oDal = new NotificationRepository(currentSession, GetCachedTemplates()); oDal.AddNotificationMessage(Notification, Notification.PersonsID); } } } catch (Exception ex) { ErrorHandler pError = new ErrorHandler(); pError.addMessageToPoisonQueue(Notification, ex); } }
public void CreateNotificationTest(int number) { string Formato = "File_{0}"; string FormatoBacheca = "Bacheca_{0}.bacheca"; NotificationToCommunity notification = new NotificationToCommunity(); notification.ActionID = 70007; notification.CommunityID = 1; notification.ModuleCode = "SRVMATER"; notification.ModuleID = 1; notification.SentDate = DateTime.Now; notification.ValueParameters = new List <string>(); notification.ValueParameters.Add(""); notification.ValueParameters.Add(""); notification.ValueParameters.Add("Facoltà di Economia"); notification.NotificatedObjects = new List <dtoNotificatedObject>(); notification.NotificatedObjects.Add(new dtoNotificatedObject() { FullyQualiFiedName = "file", ModuleCode = "SRVMATER", ModuleID = 1, ObjectID = "1", ObjectTypeID = 1 }); for (int i = 0; i < number; i++) { notification.SentDate = notification.SentDate.AddHours(1); notification.ValueParameters[1] = string.Format(Formato, i); notification.ValueParameters[0] = notification.ValueParameters[1] + ".download"; this.SendNotificationToCommunity(notification); } NotificationToPerson notificationPerson = new NotificationToPerson(); notificationPerson.ActionID = 12004; notificationPerson.CommunityID = 58; notificationPerson.ModuleCode = "SRVBACH"; notificationPerson.ModuleID = 10; notificationPerson.SentDate = DateTime.Now; notificationPerson.ValueParameters = new List <string>(); notificationPerson.ValueParameters.Add(""); notificationPerson.ValueParameters.Add("Laboratorio Maieutiche"); notificationPerson.PersonsID = new List <int>(); notificationPerson.PersonsID.Add(1); notificationPerson.PersonsID.Add(3); notificationPerson.PersonsID.Add(149); notification.NotificatedObjects = new List <dtoNotificatedObject>(); notification.NotificatedObjects.Add(new dtoNotificatedObject() { FullyQualiFiedName = "bacheca", ModuleCode = "SRVBACH", ModuleID = 10, ObjectID = "1", ObjectTypeID = 1 }); for (int i = 0; i < number; i++) { notificationPerson.SentDate = notificationPerson.SentDate.AddHours(1); notificationPerson.ValueParameters[0] = string.Format(FormatoBacheca, i) + "";; this.SendNotificationToPerson(notificationPerson); } NotificationToPermission notificationPermission = new NotificationToPermission(); notificationPermission.ActionID = 12006; notificationPermission.CommunityID = 58; notificationPermission.ModuleCode = "SRVBACH"; notificationPermission.ModuleID = 10; notificationPermission.SentDate = DateTime.Now; notificationPermission.ValueParameters = new List <string>(); notificationPermission.ValueParameters.Add("Laboratorio Maieutiche"); notificationPermission.Permission = 6; notification.NotificatedObjects = new List <dtoNotificatedObject>(); notification.NotificatedObjects.Add(new dtoNotificatedObject() { FullyQualiFiedName = "bacheca", ModuleCode = "SRVBACH", ModuleID = 10, ObjectID = "1", ObjectTypeID = 1 }); for (int i = 0; i < number; i++) { notificationPermission.SentDate = notificationPermission.SentDate.AddHours(1); this.SendNotificationToPermission(notificationPermission); } }
public void SendNotificationToPerson(NotificationToPerson notification) { _ServiceSender.SendNotificationToPerson(notification); }
public void NotifyToUsers(NotificationToPerson Notification) { }
public void SendNotificationToPerson(NotificationToPerson notification) { //notification.SentDate = DateTime.Now; this.RemoteService.NotifyToUsers(notification); }