private void Hostel_select_Load(object sender, EventArgs e) { ORMDataContext a1 = new ORMDataContext(); Hostel_find h1 = new Hostel_find(); var query = from Hostel_find in a1.Hostel_finds where Hostel_find.A_name == sel select Hostel_find.H_name; comboBox1.ValueMember = "H_name"; comboBox1.DisplayMember = "H_name"; comboBox1.DataSource = query; var query1 = from Cost_info in a1.Cost_infos where Cost_info.name == comboBox1.SelectedItem.ToString() select Cost_info; dataGridView1.DataSource = query1; }
partial void DeleteHostel_find(Hostel_find instance);
partial void UpdateHostel_find(Hostel_find instance);
partial void InsertHostel_find(Hostel_find instance);