소스 검색

Modified Executing Directory 3rd attempt

tags/jdis_osx
rpm-mcarman 3 년 전
부모
커밋
31f580d3d6
1개의 변경된 파일6개의 추가작업 그리고 4개의 파일을 삭제
  1. +6
    -4
      Program.cs

+ 6
- 4
Program.cs 파일 보기

@@ -90,7 +90,8 @@ namespace jdis_import
list.Add(todo);
//Download File
FileAttachment fAttachment = attachment as FileAttachment;
File.WriteAllBytes(fAttachment.Name, fAttachment.Content);
string fileAttachmentPath = Path.Combine(_exeDir, fAttachment.FileName);
File.WriteAllBytes(fileAttachmentPath, fAttachment.Content);
msg.IsRead = true;
}
}
@@ -116,7 +117,7 @@ namespace jdis_import
else
{
body = string.Format(body, sendMsg.FileName, sendMsg.WorkOrder, string.Format("Had Errors while importing: {0}", sendMsg.Validation));
msgToSend.Attachments.AddFileAttachment(sendMsg.FileName);
msgToSend.Attachments.AddFileAttachment(Path.Combine(_exeDir, sendMsg.FileName)
}
@@ -125,8 +126,9 @@ namespace jdis_import
msgToSend.CcRecipients.Add(new EmailAddress("mcarman@rpmindustries.com"));
msgToSend.Body = body;
msgToSend.SendAndSaveCopy();
if (sendMsg.Success) File.Move(sendMsg.FileName, Path.Combine("Success", sendMsg.FileName));
else File.Move(sendMsg.FileName, Path.Combine("Fail", sendMsg.FileName));
string pathToFile = Path.Combine(_exeDir, sendMsg.FileName);
if (sendMsg.Success) File.Move(pathToFile, Path.Combine(_exeDir, "Success", sendMsg.FileName));
else File.Move(sendMsg.FileName, Path.Combine(_exeDir, "Fail", sendMsg.FileName));
}
}
catch (MsalException ex)


불러오는 중...
취소
저장