private void button3_Click(object sender, EventArgs e) { OracleConnection ora = new OracleConnection("DATA SOURCE = EC11; PASSWORD = qwerty; USER ID = Dmitriy;"); ora.Open(); OracleCommand com = new OracleCommand("deleteAutoPers", ora); com.CommandType = System.Data.CommandType.StoredProcedure; com.Parameters.Add("lastName", OracleType.Char, 20).Value = comboBox1.Text; com.ExecuteNonQuery(); DelWokerForm d = new DelWokerForm(); d.Show(); ora.Close(); }
private void button7_Click(object sender, EventArgs e) { if (delAutoNum.Text == "") { ErrorInputLable er = new ErrorInputLable(); er.Show(); } else { OracleConnection ora = new OracleConnection("DATA SOURCE = EC11; PASSWORD = qwerty; USER ID = Dmitriy;"); ora.Open(); OracleCommand com = new OracleCommand("delAuto", ora); com.CommandType = System.Data.CommandType.StoredProcedure; com.Parameters.Add("numAuto", OracleType.Char, 20).Value = delAutoNum.Text; com.ExecuteNonQuery(); DelWokerForm d = new DelWokerForm(); d.Show(); ora.Close(); } }