public bool Counter_GetExecListCounter(ExecList model) { try { int counterTypeId = 0; switch (model.ExecListTypeId) { case NomenclatureConstants.ExecListTypes.Country: counterTypeId = NomenclatureConstants.CounterTypes.ExecListCountry; break; case NomenclatureConstants.ExecListTypes.ThirdPerson: counterTypeId = NomenclatureConstants.CounterTypes.ExecListThirdPerson; break; } var counterId = repo.AllReadonly <Counter>() .Where(x => x.CourtId == model.CourtId && x.CounterTypeId == counterTypeId) .Select(x => x.Id) .FirstOrDefault(); if (counterId > 0) { (int intValue, string stringValue) = Counter_GetValueMulti(counterId); model.RegNumber = intValue.ToString(); model.RegDate = DateTime.Now; return(true); } else { throw new Exception($"Няма настроен брояч за изпълнителен лист. Court={model.CourtId}"); } } catch (Exception ex) { logger.LogError(ex, $"Грешка при запис на брояч за изпълнителен лист. Court={model.CourtId}"); } return(false); }
public bool Counter_GetExecListCounter(ExecList model) { throw new NotImplementedException(); }