예제 #1
0
        /// <summary>
        /// Создание контрагента
        /// </summary>
        private void AddCounterparty_Click(object sender, RoutedEventArgs e)
        {
            CounterpartyWindow view = new CounterpartyWindow(ShowProviders);

            view.Owner = this;

            view.ShowDialog();

            SearchText_Changed(null, null);
        }
예제 #2
0
        /// <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();
        }
예제 #3
0
        /// <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();
        }