DataSet does not support System.Nullable<> exception in c#

后端 未结 5 1064
伪装坚强ぢ
伪装坚强ぢ 2021-01-21 01:47
public partial class Form2 : Form
{
        public Form2()
        {
            InitializeComponent();
        }
        private void Form2_Load(object sender, EventArg         


        
5条回答
  •  感动是毒
    2021-01-21 02:41

    iF Data Type is String then

    SPartSalePrice =s.SPartSalePrice == null ? "" : s.SPartSalePrice;
    

    which show blank if data is null else show data.

    If data type is int then

    PartSalePrice = s.SPartSalePrice == null ? 0 : s.SPartSalePrice 
    

提交回复
热议问题