コード例 #1
0
ファイル: Proxy.cs プロジェクト: willdarwin/tta
        /// <summary>
        /// Get all list of orderdetails by orderid  --by Eric
        /// </summary>
        /// <param name="orderid"></param>
        /// <returns> List<OrderDetailsBE>  </OrderDetailsBE> </returns>
        public List <OrderDetailsBE> GetOrderDetailsByOrderId(int orderid)
        {
            GetOrderDetailsByOrderIdRequest request = new GetOrderDetailsByOrderIdRequest();

            request.Id = orderid;
            GetOrderDetailsByOrderIdResponse response = MyChannelFactory.CreateChannel().GetOrderDetailsByOrderId(request);

            if (response != null)
            {
                if (response.IsFailed == true)
                {
                    throw (new Exception(response.Message));
                }
            }
            return(response.OrderDetailsBEList);
        }
コード例 #2
0
        /// <summary>
        /// Select List of all the OrderDetails by orderid
        /// </summary>
        /// <param name="request"></param>
        /// <returns>List of OrderDetails</returns>
        public GetOrderDetailsByOrderIdResponse GetOrderDetailsByOrderId(GetOrderDetailsByOrderIdRequest request)
        {
            OrderDetailsService service = new OrderDetailsService();
            GetOrderDetailsByOrderIdResponse response = new GetOrderDetailsByOrderIdResponse();

            try
            {
                response.OrderDetailsBEList = service.GetOrderDetailsByOrderId(request.Id);
            }
            catch (Exception ex)
            {
                response.Message  = ex.Message;
                response.IsFailed = true;
                throw new Exception(ex.Message);
            }
            return(response);
        }
コード例 #3
0
        /// <summary>
        /// Get all list of orderdetails by orderid  --by Eric
        /// </summary>
        /// <param name="orderid"></param>
        /// <returns> List<OrderDetailsBE>  </OrderDetailsBE> </returns>
        public List <OrderDetailsBE> GetOrderDetailsByOrderId(int orderid)
        {
            GetOrderDetailsByOrderIdRequest request = new GetOrderDetailsByOrderIdRequest();

            request.Id = orderid;
            GetOrderDetailsByOrderIdResponse response = MyChannelFactory.CreateChannel().GetOrderDetailsByOrderId(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);
        }