Ejemplo n.º 1
0
        public IActionResult Detail(int orderId)
        {
            GetOrderRequest request = new GetOrderRequest()
            {
                OrderId = orderId
            };
            GetOrderResponse  response  = _orderService.GetOrder(request);
            CustomerOrderView orderView = new CustomerOrderView();

            orderView.BasketSummary = GetBasketSummaryView();
            orderView.Order         = response.Order;

            return(View(orderView));
        }
        public CustomerOrderView getCustomerOrderView(int orderId)
        {
            GetOrderRequest request = new GetOrderRequest()
            {
                OrderId = orderId
            };
            GetOrderResponse response = _orderService.GetOrder(request);

            CustomerOrderView orderView = new CustomerOrderView();

            orderView.BasketSummary = base.GetBasketSummaryView();
            orderView.Order         = response.Order;
            return(orderView);
        }
        public ActionResult <CustomerOrderView> Detail(int orderId)
        {
            var request = new GetOrderRequest()
            {
                OrderId = orderId
            };
            var response = _orderService.GetOrder(request);

            var orderView = new CustomerOrderView();

            orderView.BasketSummary = base.GetBasketSummaryView();
            orderView.Order         = response.Order;

            return(orderView);
        }
Ejemplo n.º 4
0
        public List <CustomerOrderView> Da_ShowCustomerOrderDetail()
        {
            List <CustomerOrderView> customerOrderViews = new List <CustomerOrderView>();
            SqlDataReader            sdr;

            using (sqlConnection = new SqlConnection(con))
            {
                using (SqlCommand cmd = new SqlCommand("sp_showCustomerOrderDetail", sqlConnection))
                {
                    cmd.CommandType = CommandType.StoredProcedure;
                    sqlConnection.Open();
                    sdr = cmd.ExecuteReader();
                    while (sdr.Read())
                    {
                        CustomerOrderView c = new CustomerOrderView();
                        c.UserName       = sdr["Username"].ToString();
                        c.CustomerOrders = Da_GetCustomerDetailUsingUserName(sdr["Username"].ToString());
                        c.Count          = Convert.ToInt32(sdr["OrderCount"].ToString());
                        customerOrderViews.Add(c);
                    }
                }
            }
            return(customerOrderViews);
        }
        public ActionResult Detail(int orderId)
        {
            CustomerOrderView orderView = getCustomerOrderView(orderId);

            return(View(orderView));
        }