public async Task <IActionResult> Details(Guid?id)
        {
            if (id == null)
            {
                return(NotFound());
            }
            if (_futuresServices.FuturesViewModelExists((Guid)id))
            {
                FuturesViewModel futuresViewModel = await _futuresServices.GetFuture(id);

                return(View(futuresViewModel));
            }
            return(NotFound());
        }
Example #2
0
        public async Task <IActionResult> Create(Guid?id)
        {
            if (id != null && _futuresServices.FuturesViewModelExists((Guid)id))
            {
                var futures = await _futuresServices.GetFuture((Guid)id);

                RetireFuturesViewModel model = new RetireFuturesViewModel
                {
                    ContractNumber = futures.ContractNumber,
                    Capital        = await _futuresServices.GetResult(futures)
                };
                return(View(model));
            }
            return(NotFound());
        }