public Notification ToDeletingNotify(INotificationAuthor author) { Notification notification = new Notification(); notification.LinkId = this.Id; notification.LinkName = "Interaction"; notification.EmployeeId = author.Id; notification.NotificationText = String.Format( "{0} {1} удалил(а) взаимодействие \"{2}\", в котром вы учавствуете", author.FirstName, author.Surname, this.Name); foreach (var item in this.InteractionMembers) { notification.NotificationRecipients.Add( new NotificationRecipient() { EmployeeId = item.EmployeeId, Employee = item.Employee } ); } return(notification); }
public Notification ToAddingNotify(INotificationAuthor author) { Notification notification = new Notification(); notification.LinkId = this.Id; notification.LinkName = "Interaction"; notification.EmployeeId = author.Id; notification.NotificationText = String.Format( "{0} {1} добавил(а) вас как участника в новое взаимодействие \"{2}\"", author.FirstName, author.Surname, this.Name); foreach (var item in this.InteractionMembers) { notification.NotificationRecipients.Add( new NotificationRecipient() { EmployeeId = item.EmployeeId, Employee = item.Employee } ); } return(notification); }