public IActionResult SavePreLicenseCheck(AppPreLicenseCheckDTO model) { if (ModelState.IsValid) { _trlAppProcessService.SavePreLicenseCheck(model); return(Json(new { success = true })); } return(PartialView("_ModalTrlPreLicenseCheckEdit", model)); }
public IActionResult ModalPreLicenseCheck(Guid appId) { var preLicense = _commonDataService.GetDto <AppPreLicenseCheckDTO>(p => p.AppId == appId).SingleOrDefault(); if (preLicense != null) { return(NotFound()); } preLicense = new AppPreLicenseCheckDTO { AppId = appId, Id = Guid.Empty }; preLicense.CheckCreatedName = _commonDataService.GetDto <UserDetailsDTO>(p => p.Id == preLicense.CheckCreatedId).Select(p => p.FIO).SingleOrDefault(); return(PartialView("_ModalPrlPreLicenseCheckEdit", preLicense)); }
public void SavePreLicenseCheck(AppPreLicenseCheckDTO model) { var trl = _dataService.GetEntity <TrlApplication>(p => p.Id == model.AppId).SingleOrDefault(); if (trl == null || string.IsNullOrEmpty(trl.ExpertiseResult) || trl.ExpertiseResult == "Negative") { return; } var preLicense = _dataService.GetEntity <AppPreLicenseCheck>(p => p.Id == model.Id).SingleOrDefault(); if (preLicense != null) { return; } preLicense = new AppPreLicenseCheck(); _objectMapper.Map(model, preLicense); _dataService.Add(preLicense); _dataService.SaveChanges(); _limsExchangeService.ExportPreLicenseCheckTRL(preLicense); //TODO: Сделать спросить Юры }