checking in latest changes for Quick FTP

This commit is contained in:
2016-07-25 17:43:25 -04:00
parent 8f8541afb2
commit 1576e01dc8
109 changed files with 364 additions and 146 deletions

View File

@@ -4,6 +4,8 @@ using Sdaleo.Systems.Advantage;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.IO;
using System.Linq;
using System.Text;
using Yaulw.Registry;
@@ -18,8 +20,6 @@ namespace quickftp
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");
@@ -33,20 +33,52 @@ namespace quickftp
return;
}
string query1 = ReadQuery("query1.txt");
if (String.IsNullOrEmpty(query1))
return;
DB db = DB.Create(cred);
DBRetVal retVal = db.FillDataTable("Select Top 10 * FROM MWPAT");
DBRetVal retVal = db.FillDataTable(query1);
if(!retVal.IsValid)
{
Console.WriteLine(retVal.ErrorMsg);
return;
}
foreach (DataRow r in retVal.GetDataTableRetVal().Rows)
{
var d = r[1];
}
//Console.Writeline()
ddd();
//DBMS.CreateErrorDBRetVal
//cred.AdvDataSource = credential.DataSource;
//cred.AdvIsRemote = (ConnStr.RetrieveValue("SERVERTYPE", credential.ConnectionString) == "REMOTE");
}
public static string ReadQuery(string filename)
{
try
{ // Open the text file using a stream reader.
using (StreamReader sr = new StreamReader(filename))
{
// Read the stream to a string, and write the string to the console.
String line = sr.ReadToEnd();
return line;
}
}
catch (Exception e)
{
Console.WriteLine(String.Format("The file could not be read: {0}", filename));
Console.WriteLine(e.Message);
}
return "";
}
public static void ddd()
{
string regValue = RegKey.GetKey<string>(HKEYRoot.LocalMachine, "Software\\PanaceanTech", "SMFTP", "").ToLower();