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

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

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