Пример #1
0
        //Контекстное меню передачи заявки в работу
        void ContextTransferToStatus_Click(object sender, RoutedEventArgs e)
        {
            MenuItem mi = sender as MenuItem;

            if (mi == null)
            {
                return;
            }

            BidStatus bidStatus = mi.DataContext as BidStatus;

            if (bidStatus == null)
            {
                return;
            }

            Bid bid = dgvBid.SelectedItem as Bid;

            if (bid == null)
            {
                MessageBox.Show("Заявка не выбрана!");
                return;
            }

            PlannedShipmentDateSetWindow window
                = new PlannedShipmentDateSetWindow(bid, new Action <DateTime>((planned_shipment_date) => { SetPlannedShipmentDateChangeStatusAndSave(bid, planned_shipment_date); }));

            window.ShowDialog();
        }
Пример #2
0
        //Клик по кнопке передачи заявки в другой статус, открывает окно передачи заявки в другой статус
        void BtnBidTransferToStatus_Click(object sender, RoutedEventArgs e)
        {
            Bid bid = dgvBid.SelectedItem as Bid;

            if (bid == null)
            {
                return;
            }

            PlannedShipmentDateSetWindow window
                = new PlannedShipmentDateSetWindow(bid, new Action <DateTime>((planned_shipment_date) => { SetPlannedShipmentDateChangeStatusAndSave(bid, planned_shipment_date); }));

            window.ShowDialog();
        }