private void button12_Click(object sender, EventArgs e) { if (comboBox3.Text != "") { bd = new bedallotment(); bd.delete(Convert.ToInt32(comboBox3.Text)); MessageBox.Show("Data Deleted"); string a = comboBox3.Text; bd.select(Convert.ToInt32(a)); } else { MessageBox.Show("Please Select An Id"); } }
private void button14_Click(object sender, EventArgs e) { if (comboBox4.Text != "" && textBox1.Text != "" && textBox2.Text != "" && textBox3.Text != "" && textBox4.Text != "" && textBox5.Text != "" && radioButton1.Checked) { bd = new bedallotment(); bd.insert(textBox2.Text, comboBox4.Text, radioButton1.Text, textBox4.Text, textBox5.Text, textBox1.Text); MessageBox.Show("Data Inserted"); } else if (comboBox4.Text != "" && textBox1.Text != "" && textBox2.Text != "" && textBox3.Text != "" && textBox4.Text != "" && textBox5.Text != "" && radioButton2.Checked) { bd.insert(textBox2.Text, comboBox4.Text, radioButton2.Text, textBox4.Text, textBox5.Text, textBox1.Text); MessageBox.Show("Data Inserted"); } else { MessageBox.Show("Error! Insert Complete Data"); } Managebedallotment obj = new Managebedallotment(); obj.Show(); this.Hide(); }
private void Managebedallotment_Load(object sender, EventArgs e) { bd = new bedallotment(); bd.bedload(comboBox4); bd.bedload(comboBox1, comboBox3); }