public static Assert GetId(string tableName, int id)
{
string sql = "select * from " + tableName + " where num='" + id + "'"; DataTable dt = DBHelper.ExecuteGetDataTable(sql, CommandType.Text, null);
怎么返回实体类型,初学者,帮忙,谢谢 }
{
string sql = "select * from " + tableName + " where num='" + id + "'"; DataTable dt = DBHelper.ExecuteGetDataTable(sql, CommandType.Text, null);
怎么返回实体类型,初学者,帮忙,谢谢 }
qq:25004370
assert.属性名 = dt.Row[0][列名] //转成你定义的类型
return assert
这只能取到数据库中的散装数据