示例#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 DraftTenderLimitedReportingViewModel(tender);

            return(View(viewModel));
        }
示例#2
0
        public async Task <ActionResult> EditTender(DraftTenderLimitedReportingViewModel 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();
        }
示例#4
0
        public ActionResult AddTender()
        {
            var viewModel = new DraftTenderLimitedReportingViewModel();

            return(View(viewModel));
        }