private void manageReservationToolStripMenuItem_Click(object sender, EventArgs e) { this.Hide(); ManageReversationForm manageRever = new ManageReversationForm(); manageRever.ShowDialog(); }
private void ADDCustomer_btn_Click(object sender, EventArgs e) { con.Open(); SqlCommand command = con.CreateCommand(); command.CommandType = CommandType.Text; command.CommandText = "insert into Customer values (' " + textBox_ID.Text + " ', ' " + textBox_FirstName.Text + " ',' " + Textbox_LastName.Text + " ', ' " + Textbox_phNumber.Text + " ', ' " + Textbox_country + " ' )"; ; if (textBox_ID.Text == command.CommandText) { textBox_ID.Text = "0"; } else { command.ExecuteNonQuery(); con.Close(); display_Information(); MessageBox.Show("Customer information ", "Inserted sucssufull", MessageBoxButtons.OK, MessageBoxIcon.Warning); ID = textBox_ID.Text; Fname = textBox_FirstName.Text; } this.Hide(); ManageReversationForm ManREV = new ManageReversationForm(); ManREV.Show(); }