/// <summary> /// Создание контрагента /// </summary> private void AddCounterparty_Click(object sender, RoutedEventArgs e) { CounterpartyWindow view = new CounterpartyWindow(ShowProviders); view.Owner = this; view.ShowDialog(); SearchText_Changed(null, null); }
/// <summary> /// Редактирование контрагента /// </summary> private void EditCounterparty_Execute(object sender, ExecutedRoutedEventArgs e) { Counterparty counterparty = (Counterparty)dataGrid.SelectedItem; CounterpartyWindow view = new CounterpartyWindow(WindowMode.Edit, counterparty); view.Owner = this; view.ShowDialog(); dataGrid.Items.Refresh(); }
/// <summary> /// Двойной клик по контрагенту /// </summary> private void dgCounterparties_DoubleClick(object sender, MouseButtonEventArgs e) { Counterparty counterparty = (Counterparty)dataGrid.SelectedItem; CounterpartyWindow view = new CounterpartyWindow(WindowMode.Read, counterparty); view.Owner = this; view.ShowDialog(); dataGrid.Items.Refresh(); }