Пример #1
0
        public async Task <ActionResult> EditItemEU(Guid tenderGuid, string itemId)
        {
            var item = await TenderProvider.GetItem(tenderGuid, itemId);

            var viewModel = new ItemEUViewModel(tenderGuid, item);

            return(View(viewModel));
        }
Пример #2
0
        public async Task <ActionResult> AddItemEU(Guid tenderGuid, string lotId)
        {
            var viewModel = new ItemEUViewModel
            {
                TenderGuid  = tenderGuid,
                LotStringId = lotId
            };

            return(View(viewModel));
        }
Пример #3
0
        public async Task <ActionResult> EditItemEU(ItemEUViewModel viewModel)
        {
            await CheckCPVGroupNumber(viewModel.TenderGuid, viewModel.Classification);

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

            var draftItemDTO = viewModel.ToDTO();
            await TenderProvider.EditItem(viewModel.TenderGuid, draftItemDTO);

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