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;

            _realtor = AgencyModel.GetRealtor(_realtor.ID);
            OnProperyChanged(String.Empty); // update all bindings
        }
 public RealtorViewModel(int? id)
 {
     IsNotSaved = false;
     _realtor = AgencyModel.GetRealtor(id);
 }
 public RealtorViewModel(Realtor r)
 {
     IsNotSaved = false;
     this._realtor = r;
 }
 partial void DeleteRealtor(Realtor instance);
 partial void UpdateRealtor(Realtor instance);
 partial void InsertRealtor(Realtor instance);
		private void detach_Realtors(Realtor entity)
		{
			this.SendPropertyChanging();
			entity.Agency = null;
		}
		private void attach_Realtors(Realtor entity)
		{
			this.SendPropertyChanging();
			entity.Agency = this;
		}