var dadproductlist = from dgdproduct in dadData.Tables[0].AsEnumerable()
select new DeliveryAdjustmentProduct
{
AdjustmentQuantity = dgdproduct.Field<int>("AdjustedQty"),
AdjustmentType = dgdproduct.Field<char>("AdjustmentType").ToString(),
DeliveredDate = dgdproduct.Field<DateTime>("ExpectedDate"),
ProductCode = dgdproduct.Field<int>("ProductNum").ToString(),
RevisedQuantity = dgdproduct.Field<int>("RevisedOrderQty"),
SupplierId = dgdproduct.Field<int>("SupplierId").ToString(),
TrailerId = "Pradeep"
};
我编写了上面的查询来获取一个字符字段,它以"Specified Cast Not Valid"
.