Поменял сигнатуру функции получения списка элементов для диагнозов
This commit is contained in:
parent
b13b15c597
commit
05109f7b3f
@ -58,14 +58,14 @@ namespace PolyclinicBusinessLogic.BusinessLogics
|
|||||||
return element;
|
return element;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<DiagnoseViewModel>? ReadList(DiagnoseSearchModel? model)
|
public List<DiagnoseViewModel> ReadList(DiagnoseSearchModel? model = null)
|
||||||
{
|
{
|
||||||
_logger.LogInformation("ReadList. Name:{Name} Id:{Id}, UserId:{UserId}", model?.Name, model?.Id, model?.UserId);
|
_logger.LogInformation("ReadList. Name:{Name} Id:{Id}, UserId:{UserId}", model?.Name, model?.Id, model?.UserId);
|
||||||
var list = model == null ? _diagnoseStorage.GetFullList() : _diagnoseStorage.GetFilteredList(model);
|
var list = model == null ? _diagnoseStorage.GetFullList() : _diagnoseStorage.GetFilteredList(model);
|
||||||
if (list == null)
|
if (list == null)
|
||||||
{
|
{
|
||||||
_logger.LogWarning("ReadList return null list");
|
_logger.LogWarning("ReadList return null list");
|
||||||
return null;
|
return new List<DiagnoseViewModel>();
|
||||||
}
|
}
|
||||||
_logger.LogInformation("ReadList. Count:{Count}", list.Count);
|
_logger.LogInformation("ReadList. Count:{Count}", list.Count);
|
||||||
return list;
|
return list;
|
||||||
|
@ -6,7 +6,7 @@ namespace PolyclinicContracts.BusinessLogicsContracts
|
|||||||
{
|
{
|
||||||
public interface IDiagnoseLogic
|
public interface IDiagnoseLogic
|
||||||
{
|
{
|
||||||
List<DiagnoseViewModel>? ReadList(DiagnoseSearchModel? model);
|
List<DiagnoseViewModel> ReadList(DiagnoseSearchModel? model = null);
|
||||||
DiagnoseViewModel? ReadElement(DiagnoseSearchModel model);
|
DiagnoseViewModel? ReadElement(DiagnoseSearchModel model);
|
||||||
bool Create(DiagnoseBindingModel model);
|
bool Create(DiagnoseBindingModel model);
|
||||||
bool Update(DiagnoseBindingModel model);
|
bool Update(DiagnoseBindingModel model);
|
||||||
|
@ -19,7 +19,7 @@ namespace PolyclinicWebAppImplementer.Controllers
|
|||||||
[HttpGet]
|
[HttpGet]
|
||||||
public IActionResult Index()
|
public IActionResult Index()
|
||||||
{
|
{
|
||||||
List<DiagnoseViewModel> diagnoses = _diagnoseLogic.ReadList(null);
|
List<DiagnoseViewModel> diagnoses = _diagnoseLogic.ReadList();
|
||||||
if (diagnoses == null)
|
if (diagnoses == null)
|
||||||
{
|
{
|
||||||
diagnoses = new();
|
diagnoses = new();
|
||||||
|
Loading…
Reference in New Issue
Block a user