public async Task <ActionResult> EditTender(DraftTenderLimitedViewModel 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> AddTender(DraftTenderLimitedViewModel viewModel) { if (!ModelState.IsValid) { return(View(viewModel)); } var tenderDTO = viewModel.ToDTO(); tenderDTO.Guid = await DraftProvider.AddDraftTender(tenderDTO); return(RedirectToAction("Info", "DraftTenderInfo", new { tenderGuid = tenderDTO.Guid })); }