private void button_Vibor_Click(object sender, EventArgs e) { SqlConnection conection = ClassSQL.GetConect(); conection.Open(); try { string cmdText; cmdText = "set language english;select ID_Zal from Seans where ID_Seans = " + idha + " "; sclCom = new SqlCommand(cmdText, conection); og = sclCom.ExecuteScalar().ToString(); } catch (Exception ex) { MessageBox.Show("Ошибка в залах" + ex.Message); } conection.Close(); conection.Dispose(); Form Mesto = new Mesto(go, og); Mesto.Show(); this.Hide(); }
private void button_Vibor_Click(object sender, EventArgs e) { SqlConnection conection = ClassSQL.GetConect(); conection.Open(); try { string cmdText; cmdText = "select hall_id from film_session where session_id = " + idha + " "; //id_hall sclCom4 = new SqlCommand(cmdText, conection); og = sclCom4.ExecuteScalar().ToString(); } catch (Exception ex) { MessageBox.Show("Ошибка системы. ", "Ошибка" + ex.Message, MessageBoxButtons.OK, MessageBoxIcon.Error); } conection.Close(); conection.Dispose(); Form Mesto = new Mesto(id_p); Mesto.Show(); this.Hide(); }