//RB 20/02/2018 2018-R1 ABSEXCH-19790: Check SQL Posting Compatibility: Unhandled exception is occurred when running check for Single Daybook posting. private void SetSQLCommonConnectionString(ConnectionStringBuilder aConnStrBuilderObj) { // Rebuild Connection String string[] ConSplit = Regex.Split(SQLCommonConnectionString, ";"); ExchequerCommonSQLConnection = ""; foreach (string CSplit in ConSplit) { if (CSplit.StartsWith("Data Source")) { ExchequerCommonSQLConnection = ExchequerCommonSQLConnection + "Data Source=" + CSplit.Substring(12, (CSplit.Length - 12)) + ";"; } else if (CSplit.StartsWith("Initial Catalog")) { ExchequerCommonSQLConnection = ExchequerCommonSQLConnection + "Initial Catalog= " + CSplit.Substring(16, (CSplit.Length - 16)) + ";"; } else if (CSplit.StartsWith("User Id")) { ExchequerCommonSQLConnection = ExchequerCommonSQLConnection + "User Id=" + CSplit.Substring(8, (CSplit.Length - 8)) + ";"; } else if (CSplit.StartsWith("Password") && aConnStrBuilderObj.DecryptedPassword == "") { ExchequerCommonSQLConnection = ExchequerCommonSQLConnection + "Password= "******";"; } } ExchequerCommonSQLConnection = ExchequerCommonSQLConnection + "Provider=SQLOLEDB.1"; if (aConnStrBuilderObj.DecryptedPassword != "") { connPassword = aConnStrBuilderObj.DecryptedPassword; } }
private void btn_Load_Click(object sender, EventArgs e) { OpenFileDialog OFD = new OpenFileDialog(); OFD.Filter = "All Files (*.*)|*.*"; OFD.Multiselect = true; bool b_filePath = true; if (OFD.ShowDialog() == DialogResult.OK) { for (int i = 0; i < OFD.FileNames.Length; i++) { if (b_filePath == true) { m_filePath = CSplit.FilenameSplit(OFD.FileNames[i], false); b_filePath = false; } lb_Picture.Items.Add(CSplit.FilenameSplit(OFD.FileNames[i])); Console.WriteLine(CSplit.FilenameSplit(OFD.FileNames[i])); } } }