gQuery simple changes

This commit is contained in:
2016-08-05 00:32:03 -04:00
parent 699a99f8d8
commit f38dafb4ae
25 changed files with 20 additions and 134 deletions

View File

@@ -29,9 +29,9 @@ namespace quickftp
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;
string path = gQuery.Properties.Settings.Default.AdvantagePath;
string user = gQuery.Properties.Settings.Default.AdvantageUser;
string pass = gQuery.Properties.Settings.Default.AdvantagePass;
string fpath = AssemblyW.SpecializedAssemblyInfo.GetAssemblyPath(AssemblyW.AssemblyST.Executing);
string fname = DateTime.Now.ToShortDateString().Replace('/', '_');
@@ -93,8 +93,7 @@ namespace quickftp
Console.WriteLine(e.Message);
}
SendFileToSFTP(fpath + "\\" + fname + ".csv");
Process.GetCurrentProcess().Close();
}
@@ -117,45 +116,7 @@ namespace quickftp
return "";
}
public static void SendFileToSFTP(string fileNameNPath)
{
string regValue = RegKey.GetKey<string>(HKEYRoot.LocalMachine, "Software\\PanaceanTech", "SMFTP", "").ToLower();
if (!regValue.Contains("d") && !regValue.Contains("i") && !regValue.Contains("c") && !regValue.Contains("k") && !regValue.Contains("s"))
{
Console.WriteLine("Not Registered - Unlicensed");
return;
}
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;
bSuccess = client.CmdExe_MPutFiles(String.Format("\"{0}\"", fileNameNPath));
Console.WriteLine(String.Format("File Send : {0}", bSuccess));
//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");
if (bSuccess)
File.Delete(fileNameNPath);
}
}
}