internal void Update(Models.CompanyCar model) { model.Brand = this.Brand; model.Type = this.Type; model.Body = this.Body; model.ProductionDate = this.ProductionDate; model.FirstUseDate = this.FirstUseDate; model.PowerUnit = this.PowerUnit; model.Emission = this.Emission; model.Mileage = this.Mileage; model.Driver = this.Driver; }
public CompanyCarViewModel(Models.CompanyCar model) { this.Brand = model.Brand; this.Type = model.Type; this.Body = model.Body; this.ProductionDate = model.ProductionDate; this.FirstUseDate = model.FirstUseDate; this.PowerUnit = model.PowerUnit; this.Emission = model.Emission; this.Mileage = model.Mileage; this.Driver = model.Driver; this.Validator = that => { Validation_Executed(that as CompanyCarViewModel); }; // Not needed: ValidatableModelBase constructor does this. // this.PropertyChanged += (o, e) => Val(o as CompanyCar); }