44 lines
1.2 KiB
C#
44 lines
1.2 KiB
C#
namespace LaaProduction.Cordonel
|
|
{
|
|
using LaaProduction.Cordonel.Data.Interfaces;
|
|
using LaaProduction.Cordonel.Interfaces;
|
|
using LaaProduction.Cordonel.Models;
|
|
|
|
public class EOLProgressService : IEOLProgressService
|
|
{
|
|
private readonly IEOLProgressRepository eolRepository;
|
|
|
|
public EOLProgressService(IEOLProgressRepository eolRepository)
|
|
{
|
|
this.eolRepository = eolRepository;
|
|
}
|
|
|
|
public EOLProgressModel Complete(int pcbid, string editedBy, Status status)
|
|
{
|
|
return this.eolRepository.Complete(pcbid, editedBy, status);
|
|
}
|
|
|
|
public EOLProgressModel Delete(int pcbid, string editedBy)
|
|
{
|
|
return this.eolRepository.Delete(pcbid, editedBy);
|
|
}
|
|
|
|
public EOLProgressModel GetOrCreate(int pcbid, string editedBy)
|
|
{
|
|
var model = this.eolRepository.Find(pcbid);
|
|
|
|
if (model is null)
|
|
{
|
|
model = this.eolRepository.Create(pcbid, editedBy);
|
|
}
|
|
|
|
return model;
|
|
}
|
|
|
|
public EOLProgressModel Update(EOLProgressModel model)
|
|
{
|
|
return this.eolRepository.Update(model);
|
|
}
|
|
}
|
|
}
|