Ejemplo n.º 1
0
        private void button1_Click(object sender, EventArgs e)
        {
            if (!type)
            {
                string querry = "INSERT INTO Залы (title, description) " +
                                "VALUES ('" + title.Text.ToString() + "','" + description.Text.ToString() + "')";
                OleDbCommand command = new OleDbCommand(querry, myConnection);
                command.ExecuteNonQuery();

                myConnection.Close();
                Form hall = new hall();
                hall.Show();
                this.Close();
            }
            else
            {
                string querry = "UPDATE Залы SET title = '" + title.Text.ToString() + "', description = '" + description.Text.ToString() + "' WHERE id = " + data[0];

                OleDbCommand command = new OleDbCommand(querry, myConnection);
                command.ExecuteNonQuery();
                updateAll();
                myConnection.Close();

                Form hall = new hall();
                hall.Show();
                this.Close();
            }
        }
Ejemplo n.º 2
0
        private void button2_Click(object sender, EventArgs e)
        {
            Form hall = new hall();

            hall.Show();
            this.Close();
        }