private void AddDataSetCommandHandler() { DataSetConfigurationWrapper _dsc = DataSetConfigurationWrapper.CreateDefault(); DataSetItemConfirmation _confirmation = new DataSetItemConfirmation(_dsc, m_AssociationServices.GetAssociationCouplerViewModelEnumerator, true, m_DomainsService.GetAvailableDomains()) { Title = "New DataSet" }; bool _confirmed = false; b_AddRequest.Raise(_confirmation, x => { _confirmed = x.Confirmed; }); if (_confirmed) { m_DataSetModelServices.AddDataSet(_confirmation.DataSetConfigurationWrapper); _confirmation.ApplyChanges(); } }
private void EditDataSetCommandHandler() { if (CurrentDataSetItem == null) //double check { return; } DataSetItemConfirmation _confirmation = new DataSetItemConfirmation(CurrentDataSetItem, x => m_AssociationServices.GetAssociationCouplerViewModelEnumerator(x), false, m_DomainsService.GetAvailableDomains()) { Title = "Edit DataSet" }; bool _confirmed = false; b_AddRequest.Raise(_confirmation, x => { _confirmed = x.Confirmed; }); if (_confirmed) { _confirmation.ApplyChanges(); } }