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"); } } } }