System.StackOverflowException”类型的未经处理的异常出现在 未知模块 中。

guining321 2012-07-03 06:17:53
我用的是vs2010 + server 2008

public List<TableModel> GetList(TableModel entity)

{

string sql = "select * from Per_Table where 1=1";

if (string.IsNullOrEmpty(entity.Name))

sql += " And 姓名 like '%"+entity.Name+"%'";

var ds = DbSqlHelper.Query(sql);

TableModel table;

List<TableModel> list=new List<TableModel>();

foreach (DataRow row in ds.Tables[0].Rows)

{

table = new TableModel();

table.Id = row["身份证编号"].ToString();

table.Name=row["姓名"].ToString();

table.Age = Convert.ToInt32(row["年龄"].ToString());

table.Sex = row["性别"].ToString();

table.Borthday = Convert.ToDateTime(row["出生日期"].ToString());

table.Phone = row["联系电话"].ToString();

table.Text = row["工作经历"].ToString();

list.Add(table);

}

return list;

}
...全文
526 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

110,539

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧