33 lines
875 B
C#
Raw Normal View History

2024-04-30 22:40:05 +03: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 : ITaskLogic {
2024-04-30 22:40:05 +03:00
private readonly IWorkStorage _storage;
public ReportWork(IWorkStorage storage) {
_storage = storage;
}
public List<ReportWorkViewModel> GetWorks(TaskBindingModel model) {
2024-04-30 22:40:05 +03:00
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();
}
}
}