예제 #1
0
        public async Task <ActionResult> AddAnswer(Guid tenderGuid, string complaintId)
        {
            await TenderProvider.CheckTenderAuthor(tenderGuid);

            var viewModel = new TenderComplaintViewModel(tenderGuid);

            return(View(viewModel));
        }
예제 #2
0
        public async Task <ActionResult> AddAnswer(TenderComplaintViewModel viewModel)
        {
            if (!ModelState.IsValid)
            {
                return(View(viewModel));
            }
            await TenderProvider.CheckTenderAuthor(viewModel.TenderGuid);

            var complaintDTO = viewModel.ToDTO();
            await TenderProvider.AddComplaintAnswer(viewModel.TenderGuid, complaintDTO);

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