public async Task <IActionResult> Create() { ReportCreateBindingModel reportCreateBindingModel = new ReportCreateBindingModel(); await Task.Run((() => { })); return(View(reportCreateBindingModel)); }
public async Task <IActionResult> Create(ReportCreateBindingModel reportCreateBindingModel) { if (!ModelState.IsValid) { this.ViewData["error"] = ControllerConstants.InputErrorMessage; return(View(reportCreateBindingModel)); } var result = await _reportService.CreateCustomReport(reportCreateBindingModel.To <ReportServiceModel>()); if (!result) { this.ViewData["error"] = ControllerConstants.ReportCreateErrorMessage; return(View(reportCreateBindingModel)); } return(RedirectToAction("All")); }