dataGridView1 在线等送分
private void button2_Click(object sender, EventArgs e)
{
SqlConnection con = dbu.getConnection();
SqlCommand com = con.CreateCommand();
Productdiscount pd = new Productdiscount();
Serviceinformation si = new Serviceinformation();
if (MessageBox.Show( "您确定要导出吗? ", "提示 ",
MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.OK)
{
ExportDate ep = new ExportDate();
ep.dgvOutPutExcel(dataGridView1);
string se = "select sI_serviceName,aD_activityDiscount from tb_activityDiscount ad,tb_serviceInformation si where ad.aD_activityDiscountId=si.sI_serviceInformationId ";
DataSet ds = new DataSet();
SqlDataAdapter sda = new SqlDataAdapter(se,con);
sda.Fill(ds);
si.dataGridView1.DataSource = ds.Tables;为什么这里没有值啊
si.dataGridView1 是我在另一个窗体的,我现在绑定数据源的对吗?
//ep.dgvOutPutExcel(ds.Tables);
ep.dgvOutPutExcel(si.dataGridView1);
我那个