41 lines
947 B
C#
41 lines
947 B
C#
using System.Linq;
|
|
|
|
namespace bdAsegasa.db
|
|
{
|
|
public partial class historicocomisiones
|
|
{
|
|
public double TotalComisionAgente
|
|
{
|
|
get
|
|
{
|
|
return (this.comisionAgente ?? 0) + (this.incentivoAgente ?? 0);
|
|
}
|
|
}
|
|
|
|
public string CodNomAgente
|
|
{
|
|
get
|
|
{
|
|
return this.idCodigoAgenteNavigation?.Codigo + "-" + this.idCodigoAgenteNavigation?.Nombre;
|
|
}
|
|
}
|
|
|
|
public string PlanLinea
|
|
{
|
|
get
|
|
{
|
|
return this.idPolizaAgrarioNavigation?.idPlanLineaNavigation?.planLinea;
|
|
}
|
|
}
|
|
|
|
public int NumeroPolizas
|
|
{
|
|
get
|
|
{
|
|
var bd = tscgestionasegasa.NuevoContexto();
|
|
return bd.polizasagrario.Count(x => x.poliza == this.idPolizaAgrarioNavigation.poliza);
|
|
}
|
|
}
|
|
}
|
|
}
|