标签:table string list datarow foreach for get row convert
DataSet ds = dal.GetInventory();
foreach (DataTable dt in ds.Tables)
{
foreach (DataRow dr in dt.Rows)
{
InventoryList.Add(new icbc_invtorylist()
{
pruduct_num = dr["goodsid"].ToString(),
pruduct_status = Convert.ToInt32(dr["inventory_warehouseshop"]) > 0 ? 0 : 1
});
}
}
标签:table string list datarow foreach for get row convert
原文地址:http://www.cnblogs.com/watchfluture/p/6347360.html