Esempio n. 1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="issueId">issue id</param>
        /// <param name="userId">user who is performing this operation</param>
        /// <returns>list of alternatives</returns>
        public List <AlternativeModel> GetIssueAlternatives(int issueId, int userId)
        {
            AlternativeModel        am   = new AlternativeModel();
            List <AlternativeModel> list = am.ToModelList(AlternativeOp.GetIssueAlternatives(issueId, userId), am);

            return(list);
        }
Esempio n. 2
0
        /// <summary>
        /// returns a list of alternatives to an issue
        /// </summary>
        /// <param name="issueId"></param>
        /// <param name="userId"></param>
        /// <returns></returns>
        public List <AlternativeModel> GetIssueAlternatives(int issueId, int userId)
        {
            AlternativeModel        am       = new AlternativeModel();
            List <AlternativeModel> list     = am.ToModelList(AlternativeOp.GetIssueAlternatives(issueId, userId), am);
            List <CommentModel>     comments = GetComments(issueId, userId);

            foreach (AlternativeModel a in list)
            {
                a.Comments = comments.Where(x => x.Type == "Alternative" + a.Id).ToList();
            }

            return(list);
        }