public AddEditPipeFluidCodeDialog() { PipeFluidCode = null; InitializeComponent(); PipeFluidCodeViewModel model = new PipeFluidCodeViewModel(); model.View = this; this.DataContext = model; }
public AddEditPipeFluidCodeDialog(int id) { PipeFluidCode = null; InitializeComponent(); PipeFluidCodeViewModel model = new PipeFluidCodeViewModel(id); model.View = this; model.DataLoaded += () => { DataContext = model; Utils.ResetOriginalValues(this); }; }