public async Task <ActionResult> ReceivedAndCompletedDate(Guid id, ReceivedAndCompletedDateViewModel model) { if (!ModelState.IsValid) { return(View(model)); } if (model.IsReceivedDateChanged) { await mediator.SendAsync(new SetReceivedAndCompletedDate(id, model.CompletedDate.AsDateTime().Value, model.ReceivedDate.AsDateTime().Value)); } else { await mediator.SendAsync(new SetCompletedDate(id, model.CompletedDate.AsDateTime().Value)); } return(RedirectToAction("Index", "FinancialGuaranteeDecision")); }
public async Task<ActionResult> ReceivedAndCompletedDate(Guid id, ReceivedAndCompletedDateViewModel model) { if (!ModelState.IsValid) { return View(model); } if (model.IsReceivedDateChanged) { await mediator.SendAsync(new SetReceivedAndCompletedDate(id, model.CompletedDate.AsDateTime().Value, model.ReceivedDate.AsDateTime().Value)); } else { await mediator.SendAsync(new SetCompletedDate(id, model.CompletedDate.AsDateTime().Value)); } return RedirectToAction("Index", "FinancialGuaranteeDecision"); }