Beispiel #1
0
        public async Task <ActionResult> EditTender(Guid tenderGuid)
        {
            var tender = await DraftProvider.GetDraftTender(tenderGuid);

            tender.Documents = tender.Documents.Where(m => m.DocumentOf == RelatedTo.Tender).ToList();
            var viewModel = new DraftTenderAboveThresholdEUViewModel(tender);

            return(View(viewModel));
        }
Beispiel #2
0
        public async Task <ActionResult> EditTender(DraftTenderAboveThresholdEUViewModel 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 }));
        }
        public async Task <ActionResult> Info(Guid tenderGuid)
        {
            var tender = await DraftProvider.GetDraftTender(tenderGuid);

            TenderValidation(tender);

            switch (tender.ProcurementMethodType)
            {
            case ProcurementMethodType.ABOVE_THRESHOLD_UA:
            {
                var viewModel = new DraftTenderAboveThresholdUAViewModel(tender);
                return(View("InfoAboveThresholdUA", viewModel));
            }

            case ProcurementMethodType.ABOVE_THRESHOLD_EU:
            {
                var viewModel = new DraftTenderAboveThresholdEUViewModel(tender);
                return(View("InfoAboveThresholdEU", viewModel));
            }

            case ProcurementMethodType.REPORTING:
            {
                var viewModel = new DraftTenderLimitedReportingViewModel(tender);
                return(View("InfoTenderLimitedReporting", viewModel));
            }

            case ProcurementMethodType.NEGOTIATION:
            {
                var viewModel = new DraftTenderLimitedViewModel(tender);
                return(View("InfoTenderLimited", viewModel));
            }

            case ProcurementMethodType.NEGOTIATION_QUICK:
            {
                var viewModel = new DraftTenderLimitedQuickViewModel(tender);
                return(View("InfoTenderLimitedQuick", viewModel));
            }

            case ProcurementMethodType.ABOVE_THRESHOLD_UA_DEFENSE:
            {
                var viewModel = new DraftTenderDefenseViewModel(tender);
                return(View("InfoTenderDefense", viewModel));
            }

            default:
            {
                var viewModel = new DraftTenderBelowThresholdViewModel(tender);
                return(View("InfoBelowThreshold", viewModel));
            }
            }
            throw new BadRequestException();
        }
Beispiel #4
0
        public ActionResult AddTender()
        {
            var viewModel = new DraftTenderAboveThresholdEUViewModel();

            return(View(viewModel));
        }