if (ds.Tables[0].Rows[0][ "SOURCE1 "].ToString() != " ")
{
model.SOURCE1 = int.Parse(ds.Tables[0].Rows[0][ "SOURCE1 "].ToString());
}
报错无法将类型int隐式转换为string
该怎么改啊
------解决方案--------------------------------------------------------
把 int.parse改成 Convert.ToInt32
OK
------解决方案--------------------------------------------------------
ConverToString int.Parse
------解决方案--------------------------------------------------------
if (ds.Tables[0].Rows[0][ "SOURCE1 "].ToString() != " ")
{
model.SOURCE1 = int.Parse(ds.Tables[0].Rows[0][ "SOURCE1 "].ToString());
}
该为:::+++++++++++++++++++++++++++++++》》》》》》》》》》》》》
if (ds.Tables[0].Rows[0][ "SOURCE1 "].ToString() != " ")
{
model.SOURCE1 = ds.Tables[0].Rows[0][ "SOURCE1 "].ToString();
}