public AddEditDocumentLocationDialog()
 {
     InitializeComponent();
     AddEditDocumentLocationModel model = new AddEditDocumentLocationModel();
     model.View = this;
     DataContext = model;
 }
        public AddEditDocumentLocationDialog(int id)
        {
            InitializeComponent();

            AddEditDocumentLocationModel model = new AddEditDocumentLocationModel(id);
            model.View = this;

            model.DataLoaded += () =>
                {
                    DataContext = model;
                    Utils.ResetOriginalValues(this);
                };
        }