/// <summary> /// Sends the report. /// </summary> /// <param name="xmlString">The XML string.</param> public void SendReport(string xmlString) { #if PORTING UPMail mail = new UPMail(); mail.Subject = "Sync-conflict reports"; mail.AddRecipient(((UPMSyncConflictsPage)this.Page).SyncConflictEmail); string filename = $"SyncConflicts_{ServerSession.CurrentSession().UserName}_{StringExtensions.CrmValueFromDate(DateTime.UtcNow)}.xml"; UPMailAttachment attachment = new UPMailAttachment(xmlString, "application/xml", filename); mail.AddAttachment(attachment); this.ModelControllerDelegate.SendMailModal(mail, false); #endif }
/// <summary> /// Sends the report for offline request. /// </summary> /// <param name="request">The request.</param> void SendReportForOfflineRequest(UPOfflineRequest request) { #if PORTING string xmlData = request.Xml(); UPMail mail = new UPMail(); mail.Subject = NSString.StringWithFormat("SyncConflict from %@ at %@ of type %@", ServerSession.CurrentSession().UserName, request.ServerDateTime, request.ProcessType); mail.AddRecipient(((UPMSyncConflictsPage)this.Page).SyncConflictEmail); string filename = NSString.StringWithFormat("SyncConflict_%@_%@_%ld.xml", ServerSession.CurrentSession().UserName, request.ProcessType, request.RequestNr); UPMailAttachment attachment = new UPMailAttachment(xmlData, "application/xml", filename); mail.AddAttachment(attachment); this.ModelControllerDelegate.SendMailModal(mail, false); #endif }