예제 #1
0
 public void Relase(FeedBackDTO feedBack)
 {
     using (IFeedBackService feedBackService = new FeedBackService())
     {
         feedBackService.Create(FeedBackDTOToFeedBack(feedBack));
     }
 }
예제 #2
0
 public FeedBackDTO GetFeedBack(Guid feedBackId)
 {
     using (IFeedBackService feedBackSvc = new FeedBackService())
     {
         return(FeedBackToFeedBackDTO(feedBackSvc.GetOneById(feedBackId)));
     }
 }
예제 #3
0
        public List <FeedBackDTO> GetAllFeedBack()
        {
            List <FeedBackDTO> list;

            using (IFeedBackService feedBackSvc = new FeedBackService())
            {
                list = feedBackSvc.GetAll().Select(m => new FeedBackDTO()
                {
                    Content    = m.Content,
                    CreateTime = m.CreteTime,
                    FeedBackId = m.Id,
                    Title      = m.Title,
                    UserId     = m.UserId
                }).ToList();
            }
            foreach (var item in list)
            {
                using (IUserService userSvc = new UserService())
                {
                    item.CompanyName = userSvc.GetOneById(item.UserId).CompanyName;
                }
            }
            return(list);
        }