public AddEditEngineeringUnitDialog() { InitializeComponent(); model = new AddEditCalibrationEngineeringUnitModel(); DataContext = model; model.View = this; Title = "Add New Engineering Unit"; }
public AddEditEngineeringUnitDialog(int id) { // Required to initialize variables InitializeComponent(); model = new AddEditCalibrationEngineeringUnitModel(id); model.View = this; Title = "Edit Engineering Unit"; model.DataSourceLoaded += () => { DataContext = model; }; }