//outbound data is CSV private static DataSet ReadOutboundDataFolder() { var fileNames = GetFileNames(string.Format(@"{0}\{1}", GetCurrentDirectory(), OutboundFolder), "*.csv"); WriteLine(string.Format("Found {0} files in {1}", fileNames.Length, OutboundFolder)); if (fileNames.Length < 1) { throw new FileNotFoundException(string.Format("No csv file in {0} folder", OutboundFolder)); } var set = OleReader.ReadCSVFile(fileNames[0]); for (int i = 1; i < fileNames.Length; i++) { set.Merge(OleReader.ReadCSVFile(fileNames[i])); } return(set); }
private Boolean checkoldpass(string oldpass) { string sqlString; string datapass; OleDbDataReader OleReader; byte[] d = Encoding.Unicode.GetBytes(oldpass); datapass = System.Convert.ToBase64String(d); sqlString = "SELECT * FROM QUANLYUSER WHERE [Username] = '" + username + "' AND"; sqlString = sqlString + " [password] = '" + datapass + "'"; OleReader = pwddb.genDataReader(sqlString); if ((OleReader != null) && (OleReader.Read())) { return(true); } else { return(false); } }