private void button51_Click(object sender, EventArgs e) { Objets.LocalSaveSetting("B1-Prestashop", "Config", "SQLServer", textBox19.Text); Objets.LocalSaveSetting("B1-Prestashop", "Config", "TypeServeur", comboBox2.Text); Objets.LocalSaveSetting("B1-Prestashop", "Config", "SQLUser", textBox18.Text); Objets.LocalSaveSetting("B1-Prestashop", "Config", "SQLPassword", textBox17.Text); Objets.LocalSaveSetting("B1-Prestashop", "Config", "SQLAuthModeWindows", checkBox15.Checked); Objets.LocalSaveSetting("B1-Prestashop", "Config", "SBODbCompany", comboBox3.Text); Objets.LocalSaveSetting("B1-Prestashop", "Config", "LicenceServer", comboBox1.Text); Objets.LocalSaveSetting("B1-Prestashop", "Config", "SBOUser", textBox16.Text); Objets.LocalSaveSetting("B1-Prestashop", "Config", "SBOPassword", textBox15.Text); try { this.Cursor = Cursors.WaitCursor; int Connexion = Parametres.ConnectSqlSap(textBox19.Text, comboBox2.Text, textBox18.Text, textBox17.Text, comboBox3.Text, textBox16.Text, textBox15.Text, comboBox1.Text); if (Connexion != 0) { Interaction.MsgBox("Connexion échouée : ", MsgBoxStyle.Exclamation, this.Text); } else { Interaction.MsgBox("Connexion réussie.", MsgBoxStyle.Information, this.Text); } this.Cursor = Cursors.Default; } catch (Exception exception1) { ProjectData.SetProjectError(exception1); Exception exception = exception1; Interaction.MsgBox(string.Concat("Exception lors du test : ", exception.Message, "\r\n", exception.StackTrace), MsgBoxStyle.OkOnly, null); ProjectData.ClearProjectError(); } }
private void bTester_Click_1(object sender, EventArgs e) { try { this.Cursor = Cursors.WaitCursor; int Connexion = Parametres.ConnectSqlSap(tSQLServer.Text, cbBases.Text, tSQLLogin.Text, tSQLPassword.Text, cbSQLType.Text, tSBOLogin.Text, tSBOPassword.Text, tLicenceServ.Text); if (Connexion != 0) { Interaction.MsgBox("Connexion échouée : ", MsgBoxStyle.Exclamation, this.Text); } else { Interaction.MsgBox("Connexion réussie.", MsgBoxStyle.Information, this.Text); } this.Cursor = Cursors.Default; } catch (Exception exception1) { ProjectData.SetProjectError(exception1); Exception exception = exception1; Interaction.MsgBox(string.Concat("Exception lors du test : ", exception.Message, "\r\n", exception.StackTrace), MsgBoxStyle.OkOnly, null); ProjectData.ClearProjectError(); } }