本文介绍了再次单击按钮时,请有人我在此代码中有错误.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
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");.
推荐答案
这篇关于再次单击按钮时,请有人我在此代码中有错误.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!