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