示例#1
0
 private static async Task ExportFileNCBJobAsync()
 {
     using (var client = new CSMFileServiceClient())
     {
         Task <ExportNCBTaskResponse> t      = client.ExportFileNCBAsync(WebConfig.GetWebUsername(), WebConfig.GetWebPassword());
         ExportNCBTaskResponse        result = await t;
     }
 }
示例#2
0
        private static void SendMailTask(ExportNCBTaskResponse result)
        {
            _mailSender = TaskMailSender.GetTaskMailSender();
            if (Constants.StatusResponse.Failed.Equals(result.StatusResponse.Status))
            {
                _mailSender.NotifyFailExportActvity(WebConfig.GetTaskEmailToAddress(), result.SchedDateTime, result.StatusResponse.Description);
            }

            Thread.Sleep(5000);
        }
示例#3
0
文件: AFSFacade.cs 项目: KKPBank/CSM
        public void SaveLogExportMarketingError(ExportNCBTaskResponse taskResponse)
        {
            if (taskResponse != null)
            {
                StringBuilder sb = new StringBuilder("");
                sb.AppendFormat("Error Message = {0}\n", taskResponse.StatusResponse.Description);

                _auditLog              = new AuditLogEntity();
                _auditLog.Module       = Constants.Module.Batch;
                _auditLog.Action       = Constants.AuditAction.ExportMarketing;
                _auditLog.IpAddress    = ApplicationHelpers.GetClientIP();
                _auditLog.Status       = LogStatus.Fail;
                _auditLog.Detail       = sb.ToString();
                _auditLog.CreateUserId = null;
                _auditLog.CreatedDate  = taskResponse.SchedDateTime;
                AppLog.AuditLog(_auditLog);
            }
        }
示例#4
0
文件: AFSFacade.cs 项目: KKPBank/CSM
        public void SaveLogExportMarketingSuccess(ExportNCBTaskResponse taskResponse)
        {
            if (taskResponse != null)
            {
                StringBuilder sb = new StringBuilder("");
                sb.Append("Success to export marketing\n");
                sb.Append(taskResponse.ToString());

                _auditLog              = new AuditLogEntity();
                _auditLog.Module       = Constants.Module.Batch;
                _auditLog.Action       = Constants.AuditAction.ExportMarketing;
                _auditLog.IpAddress    = ApplicationHelpers.GetClientIP();
                _auditLog.Status       = LogStatus.Success;
                _auditLog.Detail       = sb.ToString();
                _auditLog.CreateUserId = null;
                _auditLog.CreatedDate  = taskResponse.SchedDateTime;
                AppLog.AuditLog(_auditLog);
            }
        }