Beispiel #1
0
        /// <summary>
        /// Get all list of orderdetails  --by Eric
        /// </summary>
        /// <returns></returns>
        public List <OrderDetailsBE> GetAllOrderDetails()
        {
            GetAllOrderDetailsRequest  request  = new GetAllOrderDetailsRequest();
            GetAllOrderDetailsResponse response = MyChannelFactory.CreateChannel().GetAllOrderDetails(request);

            if (response != null)
            {
                if (response.IsFailed == true)
                {
                    throw (new Exception(response.Message));
                }
            }
            return(response.OrderDetailsBEList);
        }
Beispiel #2
0
        /// <summary>
        /// Select List of all the OrderDetails
        /// </summary>
        /// <returns>List of OrderDetails </returns>
        public GetAllOrderDetailsResponse GetAllOrderDetails(GetAllOrderDetailsRequest request)
        {
            OrderDetailsService        service  = new OrderDetailsService();
            GetAllOrderDetailsResponse response = new GetAllOrderDetailsResponse();

            try
            {
                response.OrderDetailsBEList = service.GetAllOrderDetails();
            }
            catch (Exception ex)
            {
                response.IsFailed = true;
                response.Message  = ex.Message;
            }
            return(response);
        }
Beispiel #3
0
        /// <summary>
        /// Get all list of orderdetails  --by Eric
        /// </summary>
        /// <returns></returns>
        public List <OrderDetailsBE> GetAllOrderDetails()
        {
            GetAllOrderDetailsRequest  request  = new GetAllOrderDetailsRequest();
            GetAllOrderDetailsResponse response = MyChannelFactory.CreateChannel().GetAllOrderDetails(request);

            if (response != null)
            {
                if (response.IsFailed == true)
                {
                    ILog log = log4net.LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
                    log.Error("error", new Exception(response.Message));
                    log.Fatal("fatal", new Exception(response.Message));
                    throw (new Exception(response.Message));
                }
            }
            return(response.OrderDetailsBEList);
        }
Beispiel #4
0
        public NegotiatedContentResult <GetAllOrderDetailsResponse> PostGetAllOrderDetails([FromBody] GetAllOrderDetailsRequest request)
        {
            GetAllOrderDetailsResponse resp = _ordersServices.GetAllOrderDetails(request);

            return(Content(HttpStatusCode.OK, resp));
        }