public static string CreateComments(TrackerEntry entry) { StringBuilder sb = new StringBuilder(); sb.Append("<center>Comments<br>----------------------------------------------------------------------------</center>"); List <CommentEntry> entries = entry.Comments; if (entries == null) { entries = new List <CommentEntry>(); } for (int i = 0; i < entries.Count; i++) { CommentEntry c = entries[i]; if (c != null) { sb.AppendFormat("Comment by: {0} - {1} {2}<br><br>{3}<center><br>----------------------------------------------------------------------------<br></center>", c.Submitter, c.Created.ToShortDateString(), c.Created.ToShortTimeString(), c.Comment); } } return(sb.ToString()); }
public TrackerEntry(GenericReader reader) { m_Comments = new List <CommentEntry>(); int version = reader.ReadInt(); switch (version) { case 0: { m_IssueID = reader.ReadInt(); m_Submitter = reader.ReadString(); m_CreationTime = reader.ReadDateTime(); m_LastUpdatedTime = reader.ReadDateTime(); m_AssignUser = TrackerSystem.FindUser(reader.ReadInt()); m_Message = reader.ReadString(); m_Subject = reader.ReadString(); int count = reader.ReadInt(); for (int i = 0; i < count; i++) { CommentEntry e = new CommentEntry(this, reader); if (m_Comments == null) { m_Comments = new List <CommentEntry>(); } m_Comments.Add(e); } m_Status = TrackerStatus.Find(reader.ReadInt()); m_Priority = TrackerPriority.Find(reader.ReadInt()); break; } } TrackerPersistance.AddIssue(this); }
public static void AddComment(CommentEntry entry) { m_Instance.m_AllComments[entry.CommentID] = entry; }