private void backToolStripMenuItem_Click(object sender, EventArgs e) { frmCatering cat = new frmCatering(); cat.Show(); this.Hide(); }
private void backToolStripMenuItem_Click(object sender, EventArgs e) { if (backToolStripMenuItem.Text == "Back") { frmCatering cat = new frmCatering(); cat.Show(); this.Hide(); } else { this.DialogResult = DialogResult.OK; } }
private void button1_Click(object sender, EventArgs e) { BL = new ConnectBL(); try { Properties.Settings.Default.ip = textBox1.Text; Properties.Settings.Default.port = textBox2.Text; Properties.Settings.Default.Database = textBox3.Text; Properties.Settings.Default.user = textBox4.Text; Properties.Settings.Default.pass = textBox5.Text; BL.checkConn(); frmCatering cat = new frmCatering(); cat.Show(); Properties.Settings.Default.Save(); this.Hide(); } catch (OdbcException ex) { MessageBox.Show(ex.Errors[0].ToString()); } }