对数据库中时间为空的处理和数据转换成百分数
时间:2014-05-10 06:13:39
收藏:0
阅读:365
public System.DateTime LatestEditedTime { get; set; }
public
string LatestEditedTimeValue
{
get
{
if (LatestEditedTime.ToString("yyyy-MM-dd HH:mm:ss").Equals
("1900-01-01 00:00:00"))
{
return "
";
}
else
{
return LatestEditedTime.ToString("yyyy-MM-dd HH:mm:ss"); ;
}
}
}
public System.Decimal Similarity { get; set; }
public string SimilarityVaule
{
get { return
Similarity == -1 ? "" : Similarity.ToString("0%"); }
}
评论(0)