コード例 #1
0
        public async Task <ActionResult> EditTender(DraftTenderLimitedViewModel viewModel)
        {
            if (!ModelState.IsValid)
            {
                return(View(viewModel));
            }

            var draftDTO = viewModel.ToDTO();
            await DraftProvider.EditDraftTender(viewModel.Guid, draftDTO);

            return(RedirectToAction("Info", "DraftTenderInfo", new { tenderGuid = viewModel.Guid }));
        }
コード例 #2
0
        public async Task <ActionResult> AddTender(DraftTenderLimitedViewModel viewModel)
        {
            if (!ModelState.IsValid)
            {
                return(View(viewModel));
            }

            var tenderDTO = viewModel.ToDTO();

            tenderDTO.Guid = await DraftProvider.AddDraftTender(tenderDTO);

            return(RedirectToAction("Info", "DraftTenderInfo", new { tenderGuid = tenderDTO.Guid }));
        }