标签:
public int CountMoney()
{
if (!DBNull.Value.Equals(Eval("LawyerMoney")) && !DBNull.Value.Equals(Eval("OtherMoney")))
{
int money1 = Convert.ToInt32(Eval("LawyerMoney"));
int money2 = Convert.ToInt32(Eval("OtherMoney"));
return money1 + money2;
}
if (!DBNull.Value.Equals(Eval("LawyerMoney")) && DBNull.Value.Equals(Eval("OtherMoney")))
{
int money1 = Convert.ToInt32(Eval("LawyerMoney"));
return money1;
}
if (DBNull.Value.Equals(Eval("LawyerMoney")) && !DBNull.Value.Equals(Eval("OtherMoney")))
{
int money2 = Convert.ToInt32(Eval("OtherMoney"));
return money2;
}
else
{
return 0;
}
}
标签:
原文地址:http://www.cnblogs.com/ChengBaoke/p/4661555.html