예제 #1
0
 /// <remarks/>
 public void exportBouncedToFtpAsync(FtpContactExportRequest exportBouncedToFtpRequest, object userState) {
     if ((this.exportBouncedToFtpOperationCompleted == null)) {
         this.exportBouncedToFtpOperationCompleted = new System.Threading.SendOrPostCallback(this.OnexportBouncedToFtpOperationCompleted);
     }
     this.InvokeAsync("exportBouncedToFtp", new object[] {
                 exportBouncedToFtpRequest}, this.exportBouncedToFtpOperationCompleted, userState);
 }
예제 #2
0
 /// <remarks/>
 public void exportComplainedToFtpAsync(FtpContactExportRequest exportComplainedToFtpRequest) {
     this.exportComplainedToFtpAsync(exportComplainedToFtpRequest, null);
 }
예제 #3
0
 /// <remarks/>
 public void exportBouncedToFtpAsync(FtpContactExportRequest exportBouncedToFtpRequest) {
     this.exportBouncedToFtpAsync(exportBouncedToFtpRequest, null);
 }
예제 #4
0
        public String exportReportToFtp(String contactDatabaseId, String ftpAccountId,String fileName, DateTime startTime, DateTime endTime, ReportType reportType)
        {
            String result = "";
            if (logger.IsDebugEnabled)
            {
                logger.Debug("exportReportToFtp:contactDatabaseId=" + contactDatabaseId + ",ReportType=" + reportType);
            }
            try
            {
                cn.tripolis.dialogue.export.FtpContactExportRequest request = new cn.tripolis.dialogue.export.FtpContactExportRequest();

                request.contactDatabaseId = contactDatabaseId;
                request.timeRange = new cn.tripolis.dialogue.export.TimeRange();
                request.timeRange.startTime = startTime;
                request.timeRange.endTime = endTime;
                request.fileName = fileName;
                request.ftpAccountId = ftpAccountId;// "NTM5NTM5NTNW_uqPXJDMzQ";
                request.sendNotificationMail = false;

                request.returnContactFields = new cn.tripolis.dialogue.export.ReturnContactFields();
                request.returnContactFields.contactDatabaseFieldGroupNames = new string[] { "reportgroup" };
                IDResponse response = null;
                switch (reportType)
                {
                    case ReportType.OPENED:
                        response = exportService.exportOpenedToFtp(request);
                        break;
                    case ReportType.CLICKED:
                        response = exportService.exportClickedToFtp(request);
                        break;
                    case ReportType.BOUNCED:
                        response = exportService.exportBouncedToFtp(request);
                        break;
                    case ReportType.SENT:
                        response = exportService.exportSentToFtp(request);
                        break;
                    case ReportType.COMPLAINT:
                        response = exportService.exportComplainedToFtp(request);
                        break;                  
                    default:
                        break;
                }
                if (response != null)
                {
                    result = response.id;
                }


            }
            catch (System.Web.Services.Protocols.SoapException ex)
            {

                throw new Exception(ex.Detail.InnerXml);

            }
            return result;
        }