private void AddModule_Click(object sender, RoutedEventArgs e) { EditCenterWindow editCenterWindow = new EditCenterWindow(); editCenterWindow.Om = OperationMode.AddMode; if (editCenterWindow.ShowDialog() == true) { this.bindCenterList(); } }
private async void UpdateModule_Click(object sender, RoutedEventArgs e) { if (this._selectedCenter == null || this.centerList.SelectedItems.Count == 0) { await DialogManager.ShowMessageAsync(this.GetMainWindow(), UIResources.MsgInfo, "没有选择中心请选择!", MessageDialogStyle.Affirmative, null); return; } if (this.centerList.SelectedItems.Count > 1) { await DialogManager.ShowMessageAsync(this.GetMainWindow(), UIResources.MsgInfo, "不能选择多个中心,请重新选择!", MessageDialogStyle.Affirmative, null); return; } EditCenterWindow editCenterWindow = new EditCenterWindow(); editCenterWindow.Om = OperationMode.EditMode; editCenterWindow.SelectCenter = this._selectedCenter; if (editCenterWindow.ShowDialog() == true) { this.bindCenterList(); } }