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

            var feature = await DraftProvider.GetDraftFeature(tenderGuid, featureId);

            var viewModel = new FeatureEUViewModel(tenderGuid, feature);

            return(View(viewModel));
        }
Beispiel #2
0
        public async Task <ActionResult> AddFeatureEU(FeatureEUViewModel viewModel)
        {
            if (!ModelState.IsValid)
            {
                return(View(viewModel));
            }
            var featureDTO      = viewModel.ToDTO();
            var featureStringId = await DraftProvider.AddDraftFeature(viewModel.TenderGuid, featureDTO);

            return(RedirectToAction("Info", "DraftTenderInfo", new { tenderGuid = viewModel.TenderGuid }));
        }
Beispiel #3
0
        public async Task <ActionResult> EditFeatureEU(FeatureEUViewModel viewModel)
        {
            if (!ModelState.IsValid)
            {
                return(View(viewModel));
            }

            var featureDTO = viewModel.ToDTO();
            await TenderProvider.EditFeature(viewModel.TenderGuid, featureDTO);

            return(RedirectToAction("Info", "TenderInfo", new { tenderGuid = viewModel.TenderGuid }));
        }
Beispiel #4
0
        public async Task <ActionResult> AddFeatureEU(Guid tenderGuid, FeatureType type, string relatedId)
        {
            var tender = await DraftProvider.GetDraftTender(tenderGuid);

            var viewModel = new FeatureEUViewModel
            {
                TenderGuid  = tenderGuid,
                RelatedItem = relatedId,
                Type        = type
            };

            return(View(viewModel));
        }