private void buttonDELETE_Click(object sender, EventArgs e) { SqlConnection con = new SqlConnection("Data Source=DESKTOP-5QHHH7M;Initial Catalog=HOSTEL;Integrated Security=True"); con.Open(); string query = "delete from stu_room WHERE stu_room.room_id='" + txtroomno.Text + "'"; SqlCommand runq1 = new SqlCommand(query, con); runq1.ExecuteNonQuery(); { MessageBox.Show("deletion done Successifully"); this.Hide(); Rooms_not_occupied sa = new Rooms_not_occupied(); sa.Show(); } }
private void StatusBarToolStripMenuItem_Click(object sender, EventArgs e) { Rooms_not_occupied r = new Rooms_not_occupied(); r.Show(); }
private void rOOMOCCUPIEDToolStripMenuItem_Click(object sender, EventArgs e) { Rooms_not_occupied da = new Rooms_not_occupied(); da.Show(); }