Gismatullin.ISEbd-21.STO.Co.../ServiceStation/ServiceSourceBusinessLogic/BusinessLogic/ReportWork.cs

33 lines
887 B
C#
Raw Normal View History

2024-04-30 23:40:05 +04:00
using ServiceStationContracts.BindingModels;
using ServiceStationContracts.BusinessLogicContracts;
using ServiceStationContracts.SearchModels;
using ServiceStationContracts.ViewModels;
using ServiceStationsContracts.StorageContracts;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ServiceSourceBusinessLogic.BusinessLogic {
public class ReportWork : IReportWorkLogic {
private readonly IWorkStorage _storage;
public ReportWork(IWorkStorage storage) {
_storage = storage;
}
public List<ReportWorkViewModel> GetWorks(ReportWorkBindingModel model) {
return _storage.GetFilteredList(new WorkSearchModel {
Date = model.Date
}).Select(x => new ReportWorkViewModel {
Id = x.Id,
Date = x.Date,
price = x.Price,
WorkStatus = x.Status.ToString(),
}).ToList();
}
}
}