/// <summary> /// Retrieves a specific <see cref='CodeModel' /> instance. /// </summary> /// <param name="id"> /// The unique value which distinctly identifies the <see cref='CodeModel' /> instance to be returned. /// </param> /// <returns> /// The <see cref='CodeModel' /> instance that matches the specified <paramref name='id' />; or null, if no matching instance can be found. /// </returns> public LocalCurrencyModel FetchByCodeAndSellingCompany(String code, String sellingCompany) { C4currencyRecord record = this.Provider.DataProvider.Finance.Currency.FetchByCodeandSellingCompany(code, sellingCompany); LocalCurrencyModel model = record == null ? null : new LocalCurrencyModel(this.Provider, record); return(model); }
/// <summary> /// Indicates whether the current <see cref="C4currencyRecord" /> instance is equal to another <see cref="C4currencyRecord" /> instance. /// </summary> /// <param name="that"> /// The <see cref="C4currencyRecord" /> instance to be compared against this instance. /// </param> /// <returns> /// True if both instances are considered equal; otherwise, false. /// </returns> public Boolean Equals(C4currencyRecord that) { Boolean result = true; result = result && (this.Id.TrimOrNullify() == that.Id.TrimOrNullify()); result = result && (this.Code.TrimOrNullify() == that.Code.TrimOrNullify()); result = result && (this.StartDate == that.StartDate); result = result && (this.EndDate == that.EndDate); result = result && (this.ConvFactor == that.ConvFactor); result = result && (this.DispFactor == that.DispFactor); result = result && (this.Descrip.TrimOrNullify() == that.Descrip.TrimOrNullify()); result = result && (this.Lock.TrimOrNullify() == that.Lock.TrimOrNullify()); result = result && (this.Euro == that.Euro); result = result && (this.ConvFact2 == that.ConvFact2); result = result && (this.SpId.TrimOrNullify() == that.SpId.TrimOrNullify()); result = result && (this.SymbolValue.TrimOrNullify() == that.SymbolValue.TrimOrNullify()); return(result); }
/// <summary> /// Creates a new <see cref="C4currencyRecord" /> object instance that is a shallow-copy of the current object instance. /// </summary> /// <returns> /// The shallow-copy of the current <see cref="C4currencyRecord" /> object instance. /// </returns> public C4currencyRecord Clone() { C4currencyRecord record = new C4currencyRecord(); record.Id = this.Id; record.Code = this.Code; record.StartDate = this.StartDate; record.EndDate = this.EndDate; record.ConvFactor = this.ConvFactor; record.DispFactor = this.DispFactor; record.Descrip = this.Descrip; record.Lock = this.Lock; record.Euro = this.Euro; record.AddDate = this.AddDate; record.AddBy = this.AddBy; record.ModDate = this.ModDate; record.ModBy = this.ModBy; record.RcvDate = this.RcvDate; record.RcvFrom = this.RcvFrom; record.ConvFact2 = this.ConvFact2; record.SpId = this.SpId; record.SymbolValue = this.SymbolValue; return(record); }