My system exists a class that is currently a common class for various situations, below some of the other models to exemplify
public class Servico
{
public int Id {get;set;}
public string Nome {get;set;}
public decimal? Valor {get;set;}
}
public class Coleta : Servico
{
//dados da colheita
}
public class Faturamento
{
public ICollection<Servico> Servicos {get;set;}
}
Then, this Service can be registered as
var servico = new Servico("Coleta de sangue",5.00);
Service is a% common, just to avoid repeating records and for the user to choose a model
o or services, without having to register again
But Coleta is also a service, which may or may not be carried out in the company, if carried out within the company, it will have its other fields ...
But how can I stop when I go through multiple collections, my Service Record List does not get huge? That is, select
model
is just a simple reference, since Servico
is a more complete model, that there may be actions within it
[Edit]
A step-by-step example of the process.
What I'm doing, I leave in a Coleta
the name of the Blood Collection Service, I do not let the user edit, and when I generate a work order, I generate a constant
class if done in the company (it has Coleta.cs
a view
speaking if done there or by third parties)
It could also have within the class checkbox
, a Coleta.cs
, so select it, when to do the Collection, though it is annoying and bad for the user, since it is Blood Collection and not another service, too , if it has many services, it's bad to keep looking.