public List<Comment> ViewCommentHiringById(int tid) { List<Comment> cList = new List<Comment>(); DataTable tbl = facade.ViewCommentHiringById(tid); foreach (DataRow r in tbl.Rows) { Comment c = new Comment(r[0].ToString(), r[1].ToString(), r[2].ToString(), r[3].ToString(), r[4].ToString(), r[5].ToString(),r[6].ToString(),r[7].ToString(),r[8].ToString()); cList.Add(c); } if (cList != null) { return cList; } else { return null; } }
public Comment GetRecentComment(int tid) { DataRow r = facade.GetRecentComment(tid); if (r != null) { Comment c = new Comment(r[0].ToString(), r[1].ToString(), r[2].ToString(), r[3].ToString(), r[4].ToString(), r[5].ToString(), r[6].ToString(), r[7].ToString()); return c; } else { return null; } }