Пример #1
0
        public AddEditVendorDialog()
        {
            InitializeComponent();

            AddEditVendorModel viewModel = new AddEditVendorModel();
            viewModel.View = this;
            DataContext = viewModel;

            Title = "Add Vendor";
        }
Пример #2
0
        public AddEditVendorDialog(int vendorId)
        {
            InitializeComponent();

            Title = "Edit Vendor";
            AddEditVendorModel viewModel = new AddEditVendorModel(vendorId);
            viewModel.View = this;
            viewModel.DataLoaded += () =>
                {
                    DataContext = viewModel;
                    Utils.ResetOriginalValues(this);
                };
        }