问题描述
//这个会出错。只要label22值一大于0就会出现这个错误“输入字符窜的格式不正确”publicvoidKcun(){DataSetds=newDataSet();LinkSqlDataBaselink=newLinkSqlDataBase();ds=link.SelectDataBase("select编号from库存表where仓库='"+comboBox1.Text+"'and供货商like'"+comboBox2.Text+"'GROUPBY编号","结果表");label22.Text=ds.Tables["结果表"].Rows.Count.ToString();}publicvoidTong(){DataSetds=newDataSet();LinkSqlDataBaselink=newLinkSqlDataBase();ds=link.SelectDataBase("exec盘点时库存卖出'"+comboBox1.Text+"','%"+comboBox2.Text+"%','"+dateTimePicker1.Text+"'","结果");label23.Text=ds.Tables["结果"].Rows.Count.ToString();intioc1=Convert.ToInt32(label22.Text);intico2=Convert.ToInt32(label23.Text);if(ioc1>ico2){intioc3=ioc1-ico2;label11.Text=ioc3.ToString()+"件";}else{}}//这个却没有错误想不通啊intic=Convert.ToInt32(label6.Text);intio=Convert.ToInt32(label9.Text);都是有数据的。publicvoidJiesu(){DataSetds=newDataSet();DataSetds1=newDataSet();LinkSqlDataBaselink=newLinkSqlDataBase();ds1=link.SelectDataBase("select盘点条码from盘点表groupby盘点条码","结果");label24.Text=ds1.Tables["结果"].Rows.Count.ToString();intic=Convert.ToInt32(label6.Text);intio=Convert.ToInt32(label9.Text);if(ic>io){intioc=ic-io;label15.Text=ioc.ToString();}else{intico=io-ic;label16.Text=ico.ToString();}}