public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { RequestMessage rm = (RequestMessage)value; StudentDAL sd = new StudentDAL(); Student st = sd.FindById(rm.SenderID); //,"yyyy-MM-dd HH:mm:ss" return(String.Format("{0} - {1}\n{2}", st.Users.FullName, ((DateTime)rm.Created).ToString("yyyy-MM-dd HH:mm:ss"), rm.RequestMessage1)); }
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { int?StudentID = (int?)value; if (StudentID != null) { UsersDAL ud = new UsersDAL(); StudentDAL sd = new StudentDAL(); Student s = sd.FindById((int)StudentID); return(ud.FindById(s.UserID).FullName); } return(""); }