using Sdaleo; using Sdaleo.Systems.Advantage; using System; using System.Collections.Generic; using System.Configuration; using System.Linq; using System.Text; using Yaulw.Registry; namespace quickftp { class Program { static void Main(string[] args) { string path = quickftp.Properties.Settings.Default.AdvantagePath; string user = quickftp.Properties.Settings.Default.AdvantageUser; string pass = quickftp.Properties.Settings.Default.AdvantagePass; ddd(); if (String.IsNullOrEmpty(path) || String.IsNullOrEmpty(user) || String.IsNullOrEmpty(pass)) { Console.WriteLine("Advantage settings blank or null"); return; } AdvantageCredential cred = new AdvantageCredential(path, user, pass, AdvantageCredential.ServerType.REMOTE_LOCAL); if(!cred.IsValid) { Console.WriteLine("Advantage connection invalid"); return; } DB db = DB.Create(cred); DBRetVal retVal = db.FillDataTable("Select Top 10 * FROM MWPAT"); if(!retVal.IsValid) { Console.WriteLine(retVal.ErrorMsg); return; } //DBMS.CreateErrorDBRetVal //cred.AdvDataSource = credential.DataSource; //cred.AdvIsRemote = (ConnStr.RetrieveValue("SERVERTYPE", credential.ConnectionString) == "REMOTE"); } public static void ddd() { string regValue = RegKey.GetKey(HKEYRoot.LocalMachine, "Software\\PanaceanTech", "SMFTP", "").ToLower(); using (SMFTP.SFTPClient client = new SMFTP.SFTPClient()) { //bool bConnected = client.Connect("secureftp.navicure.com", "5S3F054P", "LPM2055"); bool bConnected = client.Connect("ftp.eresourceplanner.com", "billingsolutions_embark", "Emb@rkD4t4"); if (bConnected) { bool bSuccess = true; //if (bSuccess) // bSuccess = client.CmdExec_RemoteDirExists("out/997"); //if (bSuccess) // bSuccess = client.CmdExec_LocalDirSet("c:\\out", true); //if (bSuccess) // bSuccess = client.CmdExe_MGetDir(true, "out/997"); //if (bSuccess) // bSuccess = client.CmdExec_RemoteDirSet("in"); //if (bSuccess) // bSuccess = client.CmdExec_LocalDirSet("c:\\out\\997", true); //if (bSuccess) // bSuccess = client.CmdExe_MPutFiles("\"C:\\out\\Doris day\\EmptyDummy File.txt\""); //if (bSuccess) // bSuccess = client.CmdExe_MDelFiles("*.997"); } } } } }