Ejemplo n.º 1
0
        //return View("Index",currencyViewModel);



        #region Edit
        public IActionResult Edit(long?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            var contractDelegate          = _delegate.GetContractDelegationById((int)id);
            var contractDelegateViewModel = _mapper.Map <ContractDelegateViewModel>(contractDelegate);

            if (contractDelegate == null)
            {
                return(NotFound());
            }
            var contractDelegationList = _delegate.GetContractDelegations().Where(x => x.ContractId == contractDelegate.ContractId);;

            ViewBag.ContractDelegation = contractDelegationList;
            ViewBag.ForeignAgencyId    = new SelectList(_agency.GetAgencies(), "Id", "OfficeName", contractDelegateViewModel.ForeignAgencyId);
            return(View("Index", contractDelegateViewModel));
        }