判断Table表中是否含有某一列

时间:2016-03-04 13:00:06   收藏:0   阅读:208

if (row.Table.Columns.Contains("DealRecord_GiftCost"))
{
     if (row["DealRecord_GiftCost"] != null && row["DealRecord_GiftCost"].ToString() != "")
     {
           model.DealRecord_GiftCost = decimal.Parse(row["DealRecord_GiftCost"].ToString());
     }
}

原文:http://www.cnblogs.com/taikongbai/p/5241660.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!