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); }
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(); } }
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; }
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(); }