Agregar archivos de proyecto.
This commit is contained in:
91
bdGrupoSanchoToro/extensiones/facturasrecibidas.cs
Normal file
91
bdGrupoSanchoToro/extensiones/facturasrecibidas.cs
Normal file
@@ -0,0 +1,91 @@
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace bdGrupoSanchoToro.db
|
||||
{
|
||||
[NotMapped]
|
||||
public partial class facturasrecibidas:INotifyPropertyChanged
|
||||
{
|
||||
[NotMapped]
|
||||
public virtual int NumeroDocumentos
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.documentosfacturasrecibidas.Count();
|
||||
}
|
||||
}
|
||||
[NotMapped]
|
||||
public virtual int? idProveedor_Nulable
|
||||
{
|
||||
get
|
||||
{
|
||||
if (this.idProveedor == 0)
|
||||
{
|
||||
return default;
|
||||
}
|
||||
else
|
||||
{
|
||||
return this.idProveedor;
|
||||
}
|
||||
}
|
||||
set
|
||||
{
|
||||
if (value.HasValue)
|
||||
{
|
||||
this.idProveedor = value.Value;
|
||||
}
|
||||
this.OnPropertyChanged("idProveedor_Nulable");
|
||||
}
|
||||
}
|
||||
|
||||
[NotMapped]
|
||||
public virtual double ImportePendiente
|
||||
{
|
||||
get
|
||||
{
|
||||
return Math.Round(this.TotalFactura - this.ImportePagado, 2, MidpointRounding.AwayFromZero);
|
||||
}
|
||||
}
|
||||
|
||||
private string _FicheroAdjuntoTMP;
|
||||
|
||||
public event PropertyChangedEventHandler? PropertyChanged;
|
||||
protected void OnPropertyChanged([CallerMemberName] string name = "")
|
||||
{
|
||||
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(name));
|
||||
}
|
||||
|
||||
[NotMapped]
|
||||
public virtual string FicheroAdjuntoTMP
|
||||
{
|
||||
get
|
||||
{
|
||||
if (this.idFicheroNavigation is not null)
|
||||
{
|
||||
_FicheroAdjuntoTMP = this.idFicheroNavigation.NombreFichero;
|
||||
return _FicheroAdjuntoTMP;
|
||||
}
|
||||
else
|
||||
{
|
||||
return "";
|
||||
}
|
||||
}
|
||||
set
|
||||
{
|
||||
if (string.IsNullOrEmpty(value))
|
||||
{
|
||||
if (this.idFicheroNavigation is not null)
|
||||
{
|
||||
this.idFicheroNavigation = null;
|
||||
}
|
||||
}
|
||||
_FicheroAdjuntoTMP = value;
|
||||
this.OnPropertyChanged("FicheroAdjuntoTMP");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user