public static List<TbComment> RetrieveList(int messageId) { using (DataAccess.Comment db = new DataAccess.Comment()) { return db.RetrieveList(messageId); } }
public static void Create(TbComment comment) { using (DataAccess.Comment db = new DataAccess.Comment()) { comment.RegisterDate = DateTime.Now; db.Create(comment); } }
public static bool GenerateReportBug(long idBug) { DBO.BugReport bugreport = new DBO.BugReport(); DataAccess.Bug bug = new DataAccess.Bug(); DataAccess.T_Bug b = bug.GetBug(idBug); List<DataAccess.T_Bug> li = bug.GetListBug(); DataAccess.Comment com = new DataAccess.Comment(); DataAccess.Transaction trans = new DataAccess.Transaction(); List<DataAccess.T_Transaction> lt = trans.GetListTransaction(); bugreport.Title = b.title; bugreport.Comment = com.getListCommentbyIdbug(idBug); foreach (DataAccess.T_Transaction item in lt) { if (item.T_Bug.id == idBug) { bugreport.Statut = item.statut; bugreport.Responsable = item.T_User.name + ' ' + item.T_User.firstname; break; } } return (DataAccess.GenerateDocx.GenerateReportBug(bugreport) != null); }
public bool UpdateComment(DataAccess.T_Comment comment) { DataAccess.Comment com = new DataAccess.Comment(); return com.UpdateComment(comment); }
public List<DataAccess.T_Comment> GetListCommentbyIdBug(long idBug) { DataAccess.Comment com = new DataAccess.Comment(); return com.GetListCommentbyIdBug(idBug); }
public List<DataAccess.T_Comment> GetListComment() { DataAccess.Comment com = new DataAccess.Comment(); return com.GetListComment(); }
public DataAccess.T_Comment GetComment(long id) { DataAccess.Comment com = new DataAccess.Comment(); return com.GetComment(id); }
public bool DeleteComment(long id) { DataAccess.Comment com = new DataAccess.Comment(); return com.DeleteComment(id); }
public bool CreateComment(DataAccess.T_Comment comment, long idUser, long idBug) { DataAccess.Comment com = new DataAccess.Comment(); return com.CreateComment(comment, idUser, idBug); }