Пример #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="issueId">issue id</param>
        /// <param name="userId">user who is performing operation</param>
        /// <returns>list of criteria</returns>
        public List <CriterionModel> GetIssueCrtieria(int issueId, int userId)
        {
            CriterionModel        cm   = new CriterionModel();
            List <CriterionModel> list = cm.ToModelList(CriterionOp.GetIssueCriterions(issueId, userId), cm);

            return(list);
        }
Пример #2
0
        /// <summary>
        /// returns all criteria of an issue
        /// </summary>
        /// <param name="issueId"></param>
        /// <param name="userId">user who is performing this operation</param>
        /// <returns></returns>
        public List <CriterionModel> GetIssueCriteria(int issueId, int userId)
        {
            CriterionModel        cm     = new CriterionModel();
            List <CriterionModel> cmList = cm.ToModelList(CriterionOp.GetIssueCriterions(issueId, userId), cm);

            List <CommentModel> comments = GetComments(issueId, userId);

            foreach (CriterionModel model in cmList)
            {
                model.Comments = comments.Where(x => x.Type == "Criterion" + model.Id).ToList();
            }

            return(cmList);
        }