/// <summary> /// Получение списка выдач по выбранным процедурам /// </summary> /// <returns></returns> public List <ReportDistributionProcedureViewModel> GetDistributionList(ReportDistributionProcedureBindingModel model) { var listVisits = _visitStorage.GetFullList(); var list = new List <ReportDistributionProcedureViewModel>(); foreach (var visit in listVisits) { foreach (var vp in visit.VisitProcedures) { if (vp.Value == model.ProcedureName) { var listDistribution = _distributionStorage.GetFilteredList(new DistributionBindingModel { VisitId = visit.Id }); if (listDistribution.Count > 0 && listDistribution != null) { foreach (var distribution in listDistribution) { list.Add(new ReportDistributionProcedureViewModel { ProcedureName = vp.Value, Date = distribution.IssueDate, EmployeeId = distribution.EmployeeId }); } } } } } return(list); }
public List <VisitViewModel> Read(VisitBindingModel model) { if (model == null) { return(_visitStorage.GetFullList()); } if (model.Id.HasValue) { return(new List <VisitViewModel> { _visitStorage.GetElement(model) }); } return(_visitStorage.GetFilteredList(model)); }