public void ImportFile_FromFTP(DataRow[] drKBN2) { foreach (DataRow row in drKBN2) { string[] files = GetFileList(row); if (files != null) { foreach (string file in files) { bool flg = DownloadFiles(row, file); if (flg) { dftpe = new D_FTP_Entity() { FTPType = "2", FTPFile = file, VendorCD = row["VendorCD"].ToString(), }; bool result = ftpbl.InsertFiles(dftpe); } } } } }
public void UploadFile_ToFTP(DataRow[] drKBN) { foreach (DataRow row in drKBN) { ArrayList FilePath = getFilePath(row["CreateServer"].ToString() + row["CreateFolder"].ToString() + @"\" + row["VendorCD"].ToString()); if (FilePath != null) { foreach (string file in FilePath) { bool flg = UploadFiles(row, file); if (flg) { dftpe = new D_FTP_Entity() { FTPType = "1", FTPFile = file.Split('\\').Last().ToString(), VendorCD = row["VendorCD"].ToString(), }; bool result = ftpbl.InsertFiles(dftpe); } } } } }