
ds.Tables.Count > 0 && ds.Tables[0].Rows.Count == 1
ds.Tables.Count>0&&ds.Tables[0].Rows.Count==1publicMLimitUserGetModel(stringstrWhere)...
ds.Tables.Count > 0 && ds.Tables[0].Rows.Count == 1
public MLimitUser GetModel(string strWhere) {
DataSet ds = GetList(strWhere);
//if (ds.Tables.Count > 0 && ds.Tables[0].Rows.Count == 1)
if (ds.Tables.Count > 0 )
{
//ds.Tables.Count =1;
string t=ds.Tables[0].Rows[0][0].ToString();//这里却 报错在位置 0 处没有任何行
//return DataRowToModel(ds.Tables[0].Rows[0]);
}
return null;
} 展开
public MLimitUser GetModel(string strWhere) {
DataSet ds = GetList(strWhere);
//if (ds.Tables.Count > 0 && ds.Tables[0].Rows.Count == 1)
if (ds.Tables.Count > 0 )
{
//ds.Tables.Count =1;
string t=ds.Tables[0].Rows[0][0].ToString();//这里却 报错在位置 0 处没有任何行
//return DataRowToModel(ds.Tables[0].Rows[0]);
}
return null;
} 展开
展开全部
估计是你的Tables[0]中没有值,你单步调试下,看看Tables[0]中有没有值

2023-06-03 广告
这是一张SineImage制作的分辨率测试卡配合软件可以自动计算几个关键图像质量因素包括锐度、横向色差、阶调反应、色彩反应及噪点。摄像头分辨率测试卡一种是ISO12233:2000分辨率测试卡,一种是ISO12233:2014 eSFR分辨...
点击进入详情页
本回答由赛麦吉提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询