我写的方法哪里有问题?
string P_Str_cmdtxt = "SELECT SysLoginName FROM 教师情况";
this.listBox1.DataSource = G_SqlClass.GetDs(P_Str_cmdtxt).Tables[0];
this.listBox1.DisplayMember = "SysLoginName";
this.listBox1.ValueMember = "SysLoginName";
string P_select1 = " {教师情况.SysLoginName}='" + this.listBox1.SelectedValue .ToString() + "'";
this.crystalReportViewer1.ReportSource = G_OperationWinForm.CrystalReports("CrystalReport1.rpt", P_select1);
有人说要在 listBox1_SelectedIndexChanged 事件里 listBox1.Items[listBox1.SelectedIndex].ToString()
是什么意思?
是不是因为listbox中的值根本没有选上呢?虚心求教~
string P_Str_cmdtxt = "SELECT SysLoginName FROM 教师情况";
this.listBox1.DataSource = G_SqlClass.GetDs(P_Str_cmdtxt).Tables[0];
this.listBox1.DisplayMember = "SysLoginName";
this.listBox1.ValueMember = "SysLoginName";
string P_select1 = " {教师情况.SysLoginName}='" + this.listBox1.SelectedValue .ToString() + "'";
this.crystalReportViewer1.ReportSource = G_OperationWinForm.CrystalReports("CrystalReport1.rpt", P_select1);
有人说要在 listBox1_SelectedIndexChanged 事件里 listBox1.Items[listBox1.SelectedIndex].ToString()
是什么意思?
是不是因为listbox中的值根本没有选上呢?虚心求教~
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货