Example #1
0
        public ActionResult Edit(int id)
        {
            if (!_paymentMethodService.DoesPaymentMethodExist(id))
            {
                return(HttpNotFound());
            }

            var paymentMethod = _paymentMethodService.GetPaymentMethod(id);

            var viewModel = new PaymentMethodViewModel
            {
                Heading = "Edit",
                Id      = paymentMethod.Id,
                Cost    = paymentMethod.Cost,
                Name    = paymentMethod.Name,
            };

            return(View("PaymentMethodForm", viewModel));
        }