public void ExcecuteQuery(string query, IEnumerable<OracleParameter> param = null, string connectionString = null)
using(OracleConnection connection = new OracleConnection(connectionString ?? defaultConn))
using(OracleCommand cmd = connection.CreateCommand())
{
cmd.CommandText = query;
if (param != null)
{
foreach (OracleParameter ora in param)
{
cmd.Parameters.Add(ora);
}
}
try
{
connection.Open();
}
catch (OracleException) { return; }
try
{
cmd.ExecuteNonQuery();
}
catch(OracleException e)
{
}
finally { connection.Close(); }
}
ajax:
{
// параметры запроса
},
columns:
[ {
// параметры столбца.
}, { } ... ]
columns: [ { title: "StudentGroupNumber", ... }, ... ]
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="TubeServiceSoap" maxBufferSize="" maxReceivedMessageSize="" sendTimeout="00:05:00" />
</basicHttpBinding>
<customBinding>
<binding name="TubeServiceSoap12">
<textMessageEncoding messageVersion="Soap12" />
<httpTransport />
</binding>
</customBinding>
</bindings>
<client>
<endpoint address="путь к сервису" binding="basicHttpBinding" bindingConfiguration="TubeServiceSoap" contract="TubeServiceSlezhLVL2.TubeServiceSoap" name="TubeServiceSoap" />
<endpoint address="путь к сервису" binding="customBinding" bindingConfiguration="TubeServiceSoap12" contract="TubeServiceSlezhLVL2.TubeServiceSoap" name="TubeServiceSoap12" />
</client>
</system.serviceModel>
using(var connection = new MySqlConnection(ConnectString))
{
var cmd = connection.CreateCommand();
connection.Open();
// выполняете нужные запросы.
}
private void Form1_KeyDown(object sender, KeyEventArgs e)
{
string val = comboBox1.SelectedText; //тут смотрим на выбранный элемент. Можно отслеживать по индексу через SelectedIndex.
if(e.KeyCode.ToString() == val) {} // проверяем соответствие нажатой кнопки и элемента ComboBox
}