/** * FTP Server에 데이터를 전송한다. */ public bool ftpSendData(StsInfo info) { bool result = false; sendInfo = new SndDataInfo(); sendInfo.mode = info.mode; sendInfo.iniFileName = ""; sendInfo.rawFileName = ""; sendInfo.rtdFileName = ""; Console.WriteLine("ftpSendData mode : " + sendInfo.mode); try { // FTP 전송할 파일을 읽어 들인다. bool ok = HasWritePermissionOnDir(info); if (ok == true) { setSendData(sendInfo); int sendCount = sendDataToFtpServer(); // FTP에 전송하고 전송된 개수를 리턴 받는다. info.srv_file_cnt = sendCount; if (databaseSendUpdate(info) == true) { logMsg("[ftpSendData] The data is successfully updated.[" + info.s_code + "]"); if (FileMoveProcess(info) == true) { logMsg("[ftpSendData] The data is successfully moved in the backup directory.[" + info.s_code + "]"); result = true; } else { logMsg("[ftpSendData] The job moving to the backup directory is not successed.[" + info.s_code + "]"); result = false; } } else { logMsg("[ftpSendData] The update is not successed.[" + info.s_code + "]"); result = false; } } else { logMsg("[ftpSendData] File is not exists...[" + info.s_code + "]"); result = false; } } catch (Exception ex) { logMsg("[ftpSendData] " + ex.ToString()); result = false; } return(result); }
public void setSendData(SndDataInfo data) { // mData.clear(); mData = data; }