con = new SqlConnection(str); con.Open(); string combined = "select code_customer,insurance_type,branch_name,name,address,insurance_cost,record_date from customers,branches,insurance_type where branches.code_branch=customers.code_branch and insurance_type.code_type=customers.code_type"; dset = new DataSet(); da = new SqlDataAdapter(combined, con); da.Fill(dset, "customers"); builder = new SqlCommandBuilder(da); dataGridView1.DataSource = dset.Tables["customers"]; comboBox1.DataSource = dset.Tables["customers"]; comboBox1.DisplayMember = "insurance_type"; comboBox2.DataSource = dset.Tables["customers"]; comboBox2.DisplayMember = "branch_name"; textBox1.DataBindings.Add("Text",dset.Tables["customers"], "name"); textBox2.DataBindings.Add("Text",dset.Tables["customers"], "address"); textBox3.DataBindings.Add("Text",dset.Tables["customers"], "insurance_cost"); dateTimePicker1.DataBindings.Add("value", dset.Tables["customers"], "record_date");.
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)