public void CancelChanges(object param)
        {
            System.Windows.MessageBoxResult res = System.Windows.MessageBox.Show("Вы действительно хотите отменить изменения?", "Внимание, вопрос", System.Windows.MessageBoxButton.YesNoCancel, System.Windows.MessageBoxImage.Question);

            if (res == System.Windows.MessageBoxResult.Cancel ||
                res == System.Windows.MessageBoxResult.No)
                return;

            this._agency = AgencyModel.GetAgency(1); // FIX: id
            OnProperyChanged(String.Empty); // update all bindings
        }
        public MyCompanyViewModel()
        {
            _saveChangesCommand = new DelegateCommand<object>(this.SaveChanges, delegate { return true; });
            _cancelChangesCommand = new DelegateCommand<object>(this.CancelChanges, delegate { return true; });

            this._agency = AgencyModel.GetAgency(1);
        }
 partial void UpdateAgency(Agency instance);
 partial void DeleteAgency(Agency instance);
 partial void InsertAgency(Agency instance);