Пример #1
0
        private ToolStripMenuItem CreateNewInvoice()
        {
            ToolStripMenuItem item = CreateItem("Новое перемещение");

            item.Click += delegate { InvoiceDialog.CreateNewInvoiceAndOpen(_dgvMain.GetCar()); };
            return(item);
        }
Пример #2
0
        private void DoubleClickInvoice(Point point)
        {
            if (_dgvMain.GetID() == 0)
            {
                return;
            }

            InvoiceList invoiceList = InvoiceList.getInstance();
            Invoice     invoice     = invoiceList.getItem(_dgvMain.GetID());

            if ((_dgvCar.Columns[point.X].HeaderText == "№ накладной") && (!string.IsNullOrEmpty(invoice.File)))
            {
                WorkWithFiles.OpenFile(invoice.File);
            }
            else
            {
                if (InvoiceDialog.Open(invoice))
                {
                    loadCars();
                }
            }
        }