> public partial class MuestrasEntity : ABusinessEntity > { > /// <summary> > /// MuestrasPK > /// </summary> > public int MuestrasPK > { > get > { > if (this.Row != null) > return (int)mmType.GetNonNullableDbValue(this.Row["MuestrasPK"], "System.Int32"); > else > return this._muestrasPK; > } > set > { > if (this.Row != null) > this.Row["MuestrasPK"] = value; > this._muestrasPK = value; > this.OnPropertyChanged(new PropertyChangedEventArgs("MuestrasPK")); > } > } > private int _muestrasPK; > > /// <summary> > /// ValorTotal > /// </summary> > public decimal ValorTotal > { > get > { > if (this.Row != null) > return (decimal)mmType.GetNonNullableDbValue(this.Row["ValorTotal"], "System.Decimal"); > else > return this._valorTotal; > } > set > { > if (this.Row != null) > this.Row["ValorTotal"] = value; > this._valorTotal = value; > this.OnPropertyChanged(new PropertyChangedEventArgs("ValorTotal")); > this.SetValorUnitario(); > } > } > private decimal _valorTotal; > > /// <summary> > /// Superficie > /// </summary> > public Single Superficie > { > get > { > if (this.Row != null) > return (Single)mmType.GetNonNullableDbValue(this.Row["Superficie"], "System.Single"); > else > return this._superficie; > } > set > { > if (this.Row != null) > this.Row["Superficie"] = value; > this._superficie = value; > this.OnPropertyChanged(new PropertyChangedEventArgs("Superficie")); > this.SetValorUnitario(); > } > } > private Single _superficie; > > /// <summary> > /// ValorUnitario > /// </summary> > public decimal ValorUnitario > { > get > { > if (this.Row != null) > return (decimal)mmType.GetNonNullableDbValue(this.Row["ValorUnitario"], "System.Decimal"); > else > return this._valorUnitario; > } > set > { > if (this.Row != null) > this.Row["ValorUnitario"] = value; > this._valorUnitario = value; > this.OnPropertyChanged(new PropertyChangedEventArgs("ValorUnitario")); > this.SetValorHomogeneo(); > } > } > private decimal _valorUnitario; > > private void SetValorUnitario() > { > if (this.Superficie != 0) this.ValorUnitario = this.ValorTotal / (decimal)this.Superficie; > } > > } > >>