Example #1
0
        public void TestMethod3()
        {
            CommentManager cm = new CommentManager();

            //cm.Relase(new Domain.DTO.CommentDTO()
            //{
            //    Content = "游戏内容的同时开发新的领域。这样玩家们就能在享受和支持游戏和制作者的同时让其能获得长足的发展",
            //    DemandId = Guid.Parse("34c35b45-09d1-4be3-8d96-27618b32a00c"),
            //    MaxPrice = 50.0f,
            //    MinPrice = 20.0f,
            //    Title = "佛了",
            //    UserId = Guid.Parse("d575d2d9-3a22-4465-9fe3-259ab0391988")
            //});
            Assert.IsNotNull(cm.GetAllComment(Guid.Parse("d2326cb9-12c5-4236-a496-6f320fcbf1ea")).Count > 0);
            //if(cm.GetAllComment(Guid.Parse()).Count > 0);
        }
Example #2
0
        public ActionResult DemandDetail(Guid?id)
        {
            if (id == null)
            {
                return(RedirectToAction("Index", "Home"));
            }
            IDemandManager    demandManager  = new DemandManager();
            DemandDTO         demand         = demandManager.GetDemand(id.Value);
            ICommentManager   commentManager = new CommentManager();
            List <CommentDTO> comments       = commentManager.GetAllComment(id.Value);
            List <ReplyDTO>   replys         = new List <ReplyDTO>();

            foreach (var item in comments)
            {
                IReplyManager replyManager1 = new ReplyManager();
                replys.Add(replyManager1.GetReply(item.CommentId));
            }
            ViewBag.comment = comments;
            ViewBag.reply   = replys;
            IReplyManager replyManager = new ReplyManager();

            return(View(demand));
        }