public NotificationSourceViewModel(NotificationSourceModel embeddedSourceModel) { _embeddedSourceModel = embeddedSourceModel; _notificationItemList = new Cinch.DispatcherNotifiedObservableCollection <NotificationItemViewModel>(); setupBgWorker(); _embeddedSourceModel.OnSourceUpdated += new EventHandler(sourceUpdated); }
private LienWaiverReportGenerationModel GetReportInAppropriateFormat( string format, NotificationSourceModel notificationSourceModel, ComplianceDocument complianceDocument) { return(format == NotificationFormat.Excel ? LienWaiverReportCreator.CreateReport( notificationSourceModel.NotificationSource.ReportID, complianceDocument, notificationSourceModel.IsJointCheck, ReportProcessor.FilterExcel, false) : LienWaiverReportGenerationModel); }
protected virtual void ProcessLienWaiver(NotificationSourceModel notificationSourceModel, ComplianceDocument complianceDocument) { PXProcessing.SetCurrentItem(complianceDocument); LienWaiverReportGenerationModel = LienWaiverReportCreator.CreateReport( notificationSourceModel.NotificationSource.ReportID, complianceDocument, notificationSourceModel.IsJointCheck); }
protected override void ProcessLienWaiver(NotificationSourceModel notificationSourceModel, ComplianceDocument complianceDocument) { base.ProcessLienWaiver(notificationSourceModel, complianceDocument); ConfigurePrintActionParameters(notificationSourceModel.NotificationSource.ReportID, notificationSourceModel.NotificationSource.NBranchID); UpdateLienWaiverProcessedStatus(complianceDocument); PXProcessing.SetProcessed(); }
protected override void ProcessLienWaiver(NotificationSourceModel notificationSourceModel, ComplianceDocument complianceDocument) { base.ProcessLienWaiver(notificationSourceModel, complianceDocument); var notificationRecipients = GetNotificationRecipients( notificationSourceModel.NotificationSource, notificationSourceModel.VendorId); notificationRecipients.ForEach(nr => SendEmail(nr, notificationSourceModel, complianceDocument)); PXProcessing.SetProcessed(); }
private void SendEmail(NotificationRecipient notificationRecipient, NotificationSourceModel notificationSourceModel, ComplianceDocument complianceDocument) { var email = RecipientEmailDataProvider .GetRecipientEmail(notificationRecipient, notificationSourceModel.VendorId); if (email != null) { var report = GetReportInAppropriateFormat(notificationRecipient.Format, notificationSourceModel, complianceDocument); var sender = TemplateNotificationGenerator.Create(complianceDocument, notificationSourceModel.NotificationSource.NotificationID); sender.MailAccountId = notificationSourceModel.NotificationSource.EMailAccountID; sender.RefNoteID = complianceDocument.NoteID; sender.To = email; sender.AddAttachmentLink(report.ReportFileInfo.UID.GetValueOrDefault()); sender.Send(); UpdateLienWaiverProcessedStatus(complianceDocument); } }