public async Task <ActionResult> AddAnswer(Guid tenderGuid, string complaintId) { await TenderProvider.CheckTenderAuthor(tenderGuid); var viewModel = new TenderComplaintViewModel(tenderGuid); return(View(viewModel)); }
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 })); }