示例#1
0
        void BtnEditRow_Click(object sender, RoutedEventArgs e)
        {
            Buyer buyer = dgvBuyer.SelectedItem as Buyer;

            if (buyer == null)
            {
                return;
            }

            BuyerSaveWindow window = new BuyerSaveWindow(buyer);

            window.ShowDialog();
        }
示例#2
0
        //Дабл клик по строке таблицы - открывает окно редактирования
        private void RowDoubleClick(object sender, MouseButtonEventArgs e)
        {
            DataGridRow row = sender as DataGridRow;

            Buyer buyer = row.Item as Buyer;

            if (buyer == null)
            {
                return;
            }

            BuyerSaveWindow window = new BuyerSaveWindow(buyer);

            window.ShowDialog();


            viewSource.View.Refresh();
            dgvBuyer.CurrentCell = new DataGridCellInfo(row.Item, dgvBuyer.CurrentCell.Column);
        }
示例#3
0
        void BtnAdd_Click(object sender, RoutedEventArgs e)
        {
            BuyerSaveWindow window = new BuyerSaveWindow();

            window.ShowDialog();
        }