/// <summary> /// 新增银行卡 /// </summary> internal static void AddBank(Action <bool?> call = null) { DispatcherHelper.UIDispatcher.Invoke(new Action(() => { var bankWindow = new AddBankCardWindow { Owner = Application.Current.MainWindow }; var result = bankWindow.ShowDialog(); if (call != null) { call(result); } })); }
/// <summary> /// 修改银行卡 /// </summary> internal static void ModifyBank(BankCardDto dto, Action <bool?> call = null) { DispatcherHelper.UIDispatcher.Invoke(new Action(() => { var bankWindow = new AddBankCardWindow { Owner = Application.Current.MainWindow }; var vm = (AddBankCardViewModel)bankWindow.DataContext; vm.InitModify(dto); bankWindow.Title = "修改银行卡"; var result = bankWindow.ShowDialog(); if (call != null) { call(result); } })); }