Beispiel #1
0
        public IActionResult Edit(long?id)
        {
            if (id == null)
            {
                return(NotFound());
            }
            var paymentMethod          = _payment.GetPaymentMethodById((int)id);
            var paymentMethodViewModel = _mapper.Map <PaymentMethodViewModel>(paymentMethod);

            if (paymentMethod == null)
            {
                return(NotFound());
            }
            ViewBag.AccountTreeId = new SelectList(_Acctree.GetAccountTrees(), "Id", "DescriptionAr", paymentMethod.AccountTreeId);
            var paymentMethodList = _payment.GetPaymentMethods();

            ViewBag.PaymentMethod = paymentMethodList;
            return(View("Index", paymentMethodViewModel));
        }
Beispiel #2
0
 public override void ProcessDTOPostPut(PaymentMethodDTO dto, int id, Client currentClient)
 {
     orig = repo.GetPaymentMethodById(dto == null ? id : (int)dto.Id, currentClient.Id);
 }