コード例 #1
0
        public ActionResult MakeOrder()
        {
            var userId = User.Identity.GetUserId();

            var viewModel = new CreateOrderViewModel
            {
                UserContactDetails = _userService.GetUserContactDetails(userId),
                PaymentMethods     = _paymentMethodService.GetList(),
                DeliveryTypes      = _deliveryTypeService.GetList(),
            };

            return(View(viewModel));
        }
コード例 #2
0
        public async Task <ActionResult <ApiResponse <List <PaymentMethod> > > > GatPaymentMethodList([FromQuery] Query query)
        {
            try
            {
                var pagedPaymentMethodList = await _paymentMethodService.GetList(query);

                return(pagedPaymentMethodList.CreateSuccessResponse());
            }
            catch (Exception exception)
            {
                return(BadRequest(exception.CreateErrorResponse()));
            }
        }
コード例 #3
0
        public ActionResult Index()
        {
            var viewModel = _paymentMethodService.GetList();

            return(View(viewModel));
        }