示例#1
0
 public ChatMessage(IDataReader idr, Int32 offsetHours)
 {
     SentBy   = idr.GetValueByName <String>("SentByUserName").HTMLDecode();
     Message  = idr.GetValueByName <String>("Message").HTMLDecode();
     SentDate = idr.GetValueByName <DateTime>("DateSent").AddHours(offsetHours);
     DateSent = SentDate.ToShortDateString() + " " + SentDate.ToLongTimeString();
 }
示例#2
0
 public override string ToString()
 {
     return(SentDate.ToString("dd/MMM/yyyy") + ", " +
            Recipient + ", " + Price.ToString("c"));
 }