public Form1() { InitializeComponent(); oConfig = new clsConfig(XML_CONFIG_FILE); oSQL = new clsSQL(oConfig); di = new DirectoryInfo(sFileInputLoc); fi = di.GetFiles().Where(x => x.Extension != ".db").ToArray(); //foreach (var f in fi) //{ // if (f.Extension==(".db")) // { // } //} lWindow.Items.Add("There are " + fi.Count() + " files to sort in " + sFileInputLoc); writeLog("******There are " + fi.Count() + " files to sort in " + sFileInputLoc, 0); foreach (var s in fi) { if (s.Name.Contains(".pdf")) { iPdfCount++; } if (s.Name.Contains(".tif")) { iTifCount++; } } lWindow.Items.Add(""); lWindow.Items.Add("There are " + iPdfCount + " pdfs."); lWindow.Items.Add("There are " + iTifCount + " tifs."); }
public clsSQL(clsConfig myConfig) { oConfig = myConfig; cnSQLData = new SqlConnection("Server=" + oConfig.sDataServer + ";DataBase=" + oConfig.sDataDBName + ";UID=" + oConfig.sUID + ";PWD=" + oConfig.sPWD + ";Application Name=AppointmentProviderList"); }