示例#1
0
        public void TestMethod5()
        {
            IReplyManager replyManager = new ReplyManager();

            replyManager.Relase(new Domain.DTO.ReplyDTO()
            {
                CommentId = Guid.Parse("d2326cb9-12c5-4236-a496-6f320fcbf1ea"),
                UserId    = Guid.Parse("d575d2d9-3a22-4465-9fe3-259ab0391988"),
                Content   = "231552",
            });
        }
示例#2
0
        public ActionResult RelaseReply(RelaseReplyViewModel model)
        {
            IReplyManager replyManager = new ReplyManager();

            replyManager.Relase(new ReplyDTO()
            {
                CommentId = model.CommentId,
                Content   = model.Content,
                UserId    = Guid.Parse(Session["UserId"].ToString())
            });
            return(View());
        }
示例#3
0
        public ActionResult RelaseComment(string comment_title, string comment_MinPrice, string comment_MaxPrice, string comment_content, string comment_UserId, string comment_DemandId)
        {
            ICommentManager commentManager = new CommentManager();

            commentManager.Relase(new CommentDTO()
            {
                Content  = comment_content,
                MaxPrice = Convert.ToSingle(comment_MaxPrice),
                MinPrice = Convert.ToSingle(comment_MinPrice),
                Title    = comment_title,
                UserId   = Guid.Parse(Session["UserId"].ToString()),
                DemandId = Guid.Parse(comment_DemandId)
            });
            IReplyManager replyManager = new ReplyManager();



            return(RedirectToAction("SucessResult", "Home"));
        }
示例#4
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));
        }