Example #1
0
        public async Task <ActionResult> EditItemEU(Guid tenderGuid, string itemId)
        {
            var tender = await DraftProvider.GetDraftTender(tenderGuid);

            var item = await DraftProvider.GetDraftItem(tenderGuid, itemId);

            var viewModel = new DraftItemEUViewModel(tenderGuid, item)
            {
                ProcurementMethodType = tender.ProcurementMethodType
            };

            return(View(viewModel));
        }
Example #2
0
        public async Task <ActionResult> AddItemEU(Guid tenderGuid, string lotId)
        {
            var tender = await DraftProvider.GetDraftTender(tenderGuid);

            var viewModel = new DraftItemEUViewModel
            {
                TenderGuid            = tenderGuid,
                LotStringId           = lotId,
                ProcurementMethodType = tender.ProcurementMethodType
            };

            return(View(viewModel));
        }
Example #3
0
        public async Task <ActionResult> EditItemEU(DraftItemEUViewModel viewModel)
        {
            await CheckCPVGroupNumber(viewModel.TenderGuid, viewModel.Classification);

            if (!ModelState.IsValid)
            {
                return(View(viewModel));
            }

            var draftItemDTO = viewModel.ToDTO();
            await DraftProvider.EditDraftItem(viewModel.TenderGuid, draftItemDTO);

            return(RedirectToAction("Info", "DraftTenderInfo", new { tenderGuid = viewModel.TenderGuid }));
        }