public async Task <ActionResult <ShipperModel> > GetShipper(int shipperId)
        {
            var shipper = await _shipperService.GetById(shipperId);

            if (shipper == null)
            {
                return(NotFound());
            }

            return(_mapper.Map <ShipperModel>(shipper));
        }
Exemplo n.º 2
0
        public IActionResult ShipmentSelect(Guid id)
        {
            var  shipment = shipperService.GetById(id);
            Cart cart     = SessionHelper.GetProductFromJson <Cart>(HttpContext.Session, "cart");

            cart.ShipperId = shipment.ID;
            SessionHelper.SetProductJson(HttpContext.Session, "cart", cart);
            return(Json(new { success = true }));
        }
Exemplo n.º 3
0
 public ActionResult <ShipperQueryDto> Get(int id)
 {
     return(Ok(ShipperService.GetById(id)));
 }
Exemplo n.º 4
0
        public IActionResult GetById(int id)
        {
            var model = _shipperService.GetById(id);

            return(new OkObjectResult(model));
        }
Exemplo n.º 5
0
        public async Task <Shipper> GetById(int id)
        {
            var shipper = await _shipperService.GetById(id);

            return(shipper);
        }