我在数据库中用ID2表查询,得到相应的数据现在想显示到各个TEXTBOX上。本来应该不难实现
问题是我调用的都是DLL文件。有些用不来。请大家帮帮忙~~~
public void databind()
{
DCC.SqlDC.SDC.GetTable("select T_Purchasing.T_Id,T_Purchasing.T_Number,T_Supplierroster.T_Cost_center,T_Purchasing.T_Quantity,T_Purchasing.T_DepotName,T_Supplierroster.T_Name,T_Supplierroster.T_SupplierName,T_Supplierroster.T_Shop_Num from T_Purchasing,T_Supplierroster where T_Purchasing.T_Id="+Int32.Parse(id)+"");
}//得到GETTABLE类型,查到相应字段
下面不会了~~~
问题是我调用的都是DLL文件。有些用不来。请大家帮帮忙~~~
public void databind()
{
DCC.SqlDC.SDC.GetTable("select T_Purchasing.T_Id,T_Purchasing.T_Number,T_Supplierroster.T_Cost_center,T_Purchasing.T_Quantity,T_Purchasing.T_DepotName,T_Supplierroster.T_Name,T_Supplierroster.T_SupplierName,T_Supplierroster.T_Shop_Num from T_Purchasing,T_Supplierroster where T_Purchasing.T_Id="+Int32.Parse(id)+"");
}//得到GETTABLE类型,查到相应字段
下面不会了~~~
DataTable tb = DCC.SqlDC.SDC.GetTable("select T_Purchasing.T_Id,T_Purchasing.T_Number,T_Supplierroster.T_Cost_center,T_Purchasing.T_Quantity,T_Purchasing.T_DepotName,T_Supplierroster.T_Name,T_Supplierroster.T_SupplierName,T_Supplierroster.T_Shop_Num from T_Purchasing,T_Supplierroster where T_Purchasing.T_Id="+Int32.Parse(id)+"");StringBuilder sb = new StringBuilder();
for(int i=0;i < tb.Rows.Count;i++)
{
tb.Append(tb.Rows[i]["T_Cost_center"].ToString() + "|");
}
textBox1.Text = sb.ToString();//没看明白你到底要干什么,textbox要显示什么值.....就这么写一下啦
(▄︻┻┳═一黑你没商量)你写的没有报错但是还是得不到值