Ejemplo n.º 1
0
        public TravelPaperDto QueryTripNumberDetail(string tripNumber)
        {
            TravelPaperDto TravelPaperDto = null;
            var            result         = m_travelPaperRepository.FindAll(p => p.TripNumber == tripNumber);
            TravelPaper    travelPaper    = result.FirstOrDefault();

            if (travelPaper != null)
            {
                TravelPaperDto = Mapper.Map <TravelPaper, TravelPaperDto>(travelPaper);
                TravelPaperDto.TravelPaperLogDtos = Mapper.Map <List <TravelPaperLog>, List <TravelPaperLogDto> >(travelPaper.TravelPaperLogs);
            }
            else
            {
                throw new OrderCommException("未能查到该【" + tripNumber + "】行程单号的信息");
            }
            return(TravelPaperDto);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 获取行程单详情
        /// </summary>
        /// <param name="TripNumber"></param>
        /// <returns></returns>
        public JsonResult GetTripNumberDetail(string TripNumber)
        {
            TravelPaperDto travelPaperDto = null;
            var            msg            = new RspMessageModel();

            CommunicateManager.Invoke <ITravelPaperService>(service =>
            {
                travelPaperDto = service.QueryTripNumberDetail(TripNumber);
                msg.Success    = 1;
                msg.Message    = "成功";
            }, (p =>
            {
                msg.Success = 0;
                msg.Message = p.Message;
            }));
            return(Json(new { model = travelPaperDto, msg = msg }, JsonRequestBehavior.AllowGet));
        }