/// <summary> /// Add or edit Subsidiary /// </summary> private void AddSubsidiary() { if (KmtConstants.IsOemCorp && subsidiaries.Count >= maxSubsidiaryCount) { ValidationHelper.ShowMessageBox(MergedResources.SubsidaryEditorViewModel_SubsidiaryCount, MergedResources.Common_Error); return; } Window parent = GetCurrentWindow(); SubsidiaryEditor editor = new SubsidiaryEditor(ssProxy); editor.Owner = parent; editor.ShowDialog(); if (editor.VM.IsSaved) { LoadSubsidiaries(); isChanged = true; } }
/// <summary> /// Edit the selected Subsidiary from list /// </summary> private void EditSubsidiary() { Window parent = GetCurrentWindow(); SubsidiaryEditor editor = new SubsidiaryEditor(ssProxy, SelectedSubsidiary); editor.Owner = parent; editor.ShowDialog(); if (editor.VM.IsSaved) { LoadSubsidiaries(); isChanged = true; } }
/// <summary> /// Edit the selected Subsidiary from list /// </summary> private void EditSubsidiary() { SubsidiaryEditor editor = new SubsidiaryEditor(SelectedSubsidiary); editor.Owner = App.Current.MainWindow; editor.ShowDialog(); if (editor.VM.IsSaved) LoadSubsidiaries(); }