Ejemplo n.º 1
0
        private ToolStripMenuItem CreateNewFuelCard()
        {
            ToolStripMenuItem item = CreateItem("Добавить топливную карту");

            item.Click += delegate
            {
                FuelCard_AddEdit fuelCardAddEdit = new FuelCard_AddEdit(new FuelCard());
                if (fuelCardAddEdit.ShowDialog() == DialogResult.OK)
                {
                    _mainStatus.Set(_mainStatus.Get());
                }
            };
            return(item);
        }
Ejemplo n.º 2
0
        private void DoubleClickFuelCard(Point point)
        {
            int id = _dgvMain.GetCarID();

            if (id == 0)
            {
                return;
            }

            FuelCardList fuelCardList = FuelCardList.getInstance();
            FuelCard     fuelCard     = fuelCardList.getItem(id);

            FuelCard_AddEdit fuelCardAddEdit = new FuelCard_AddEdit(fuelCard);

            if (fuelCardAddEdit.ShowDialog() == DialogResult.OK)
            {
                loadCars();
            }
        }