private void rpatientbutton_Click(object sender, EventArgs e) { pstatuscombobox.Items.Clear(); pstatuscombobox.Text = ""; pstatuscombobox.Items.Add("In Door"); pstatuscombobox.Items.Add("Out Door"); paddresscomboBox.Items.Clear(); paddresscomboBox.Text = ""; List <string> addresslist = new List <string>(); addresslist = da.addresscombo(); foreach (var address in addresslist) { paddresscomboBox.Items.Add(address); } patientsearchcomboBox.Items.Clear(); patientsearchcomboBox.Items.Add("Name"); patientsearchcomboBox.Items.Add("Roomno"); patientsearchcomboBox.Text = ""; patientsearchtextBox.Text = ""; rtabControl.SelectedTab = rpatienttab; patientregpanel.Visible = true; }