コード例 #1
0
ファイル: AdminService.cs プロジェクト: ikelos555/HSROrderApp
        public GetOrderResponse GetOrderById(GetOrderRequest request)
        {
            GetOrderResponse response = new GetOrderResponse();
            OrderBusinessComponent bc = DependencyInjectionHelper.GetOrderBusinessComponent();

            response.Order = OrderAdapter.OrderToDto(bc.GetOrderById(request.Id));

            return response;
        }
コード例 #2
0
        public GetOrderResponse GetOrderById(GetOrderRequest request)
        {   
            if (!HttpContext.Current.User.Identity.IsAuthenticated)
                throw new FaultException<NotAuthenticatedFault>(new NotAuthenticatedFault());
            GetOrderResponse response = new GetOrderResponse();
            OrderBusinessComponent bc = DependencyInjectionHelper.GetOrderBusinessComponent();

            response.Order = OrderAdapter.OrderToDto(bc.GetOrderById(request.Id));
           
            return response;
        }
コード例 #3
0
        public OrderDTO GetOrderById(int id)
        {
            try
            {
                GetOrderRequest request = new GetOrderRequest();
                request.Id = id;

                GetOrderResponse response = Service.GetOrderById(request);
                return response.Order;
            }
            catch (Exception ex)
            {
                if (ExceptionPolicy.HandleException(ex, "PL Policy")) throw;
                return new OrderDTO();
            }
        }