示例#1
0
 private static async Task GetFileCISJobAsync()
 {
     using (var client = new CSMFileServiceClient())
     {
         Task <ImportCISTaskResponse> t      = client.GetFileCISAsync(WebConfig.GetWebUsername(), WebConfig.GetWebPassword());
         ImportCISTaskResponse        result = await t;
     }
 }
示例#2
0
        private static void SendMailTask(ImportCISTaskResponse result)
        {
            _mailSender = TaskMailSender.GetTaskMailSender();
            if ((result.NumOfErrCor > 0) || (result.NumOfErrIndiv > 0) || (result.NumOfErrSub > 0) || (result.FileErrorList != null && result.FileErrorList.Length > 0))
            {
                _mailSender.NotifyImportCISFailed(WebConfig.GetTaskEmailToAddress(), result);
            }
            if (Constants.StatusResponse.Failed.Equals(result.StatusResponse.Status))
            {
                _mailSender.NotifyImportCISFailed(WebConfig.GetTaskEmailToAddress(), result.SchedDateTime, result.StatusResponse.Description);
            }

            Thread.Sleep(5000);
        }