public async Task <IActionResult> StateOfPlay(RegixStateOfPlayVM model) { ValidateReason(model.Report); if (!ModelState.IsValid) { return(View(nameof(StateOfPlay), model)); } var currentId = model.Report.Id; if (service.StateOfPlay_SaveData(model)) { await RegixReportSaveFile(NomenclatureConstants.RegixType.StateOfPlay, model.Report.Id); this.SaveLogOperation(currentId == 0, model.Report.Id); SetSuccessMessage("Четенето премина успешно"); return(RedirectToAction(nameof(StateOfPlay), new { id = model.Report.Id })); } else { SetErrorMessage("Проблем при четене на данните"); } return(View(nameof(StateOfPlay), model)); }