private void btnAddDiagCard_Click(object sender, EventArgs e) { DiagCard diagCard = _car.createDiagCard(); DiagCard_AddEdit diagcardAE = new DiagCard_AddEdit(diagCard); if (diagcardAE.ShowDialog() == System.Windows.Forms.DialogResult.OK) { diagCardList.Add(diagCard); loadDiagCard(); } }
private ToolStripMenuItem CreateNewDiagCard() { ToolStripMenuItem item = CreateItem("Новая диагностическая карта"); item.Click += delegate { Car car = _dgvMain.GetCar(); if (car == null) { return; } DiagCard diagCard = car.createDiagCard(); DiagCard_AddEdit diagcardAE = new DiagCard_AddEdit(diagCard); diagcardAE.ShowDialog(); }; return(item); }
private void _dgvDiagCard_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { int idDiagCard = Convert.ToInt32(_dgvDiagCard.Rows[e.RowIndex].Cells[0].Value); DiagCard diagCard = diagCardList.getItem(idDiagCard); if ((e.ColumnIndex == 4) && (diagCard.File != string.Empty)) { WorkWithFiles.openFile(diagCard.File); } else { DiagCard_AddEdit diagcardAE = new DiagCard_AddEdit(diagCard); if (diagcardAE.ShowDialog() == System.Windows.Forms.DialogResult.OK) { loadDiagCard(); } } }
private void DoubleClickDiagCard(Point point) { if (_dgvMain.GetID() == 0) { return; } DiagCardList diagCardList = DiagCardList.getInstance(); DiagCard diagCard = diagCardList.getItem(_dgvMain.GetID()); if ((_dgvCar.Columns[point.X].HeaderText == "№ ДК") && (!string.IsNullOrEmpty(diagCard.File))) { WorkWithFiles.openFile(diagCard.File); } else { DiagCard_AddEdit diagCardAE = new DiagCard_AddEdit(diagCard); if (diagCardAE.ShowDialog() == DialogResult.OK) { loadCars(); } } }
private ToolStripMenuItem CreateNewDiagCard() { ToolStripMenuItem item = CreateItem("Новая диагностическая карта"); item.Click += delegate { Car car = _dgvMain.GetCar(); if (car == null) return; DiagCard diagCard = car.createDiagCard(); DiagCard_AddEdit diagcardAE = new DiagCard_AddEdit(diagCard); diagcardAE.ShowDialog(); }; return item; }
private void showAddEditDiagCard(DiagCard dCard) { DiagCard_AddEdit vAE = new DiagCard_AddEdit(dCard); vAE.ShowDialog(); }
private void _dgvDiagCard_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { int idDiagCard = Convert.ToInt32(_dgvDiagCard.Rows[e.RowIndex].Cells[0].Value); DiagCard diagCard = diagCardList.getItem(idDiagCard); if ((e.ColumnIndex == 4) && (diagCard.File != string.Empty)) WorkWithFiles.openFile(diagCard.File); else { DiagCard_AddEdit diagcardAE = new DiagCard_AddEdit(diagCard); if (diagcardAE.ShowDialog() == System.Windows.Forms.DialogResult.OK) loadDiagCard(); } }
private void DoubleClickDiagCard(Point point) { if (_dgvMain.GetID() == 0) return; DiagCardList diagCardList = DiagCardList.getInstance(); DiagCard diagCard = diagCardList.getItem(_dgvMain.GetID()); if ((_dgvCar.Columns[point.X].HeaderText == "№ ДК") && (!string.IsNullOrEmpty(diagCard.File))) WorkWithFiles.openFile(diagCard.File); else { DiagCard_AddEdit diagCardAE = new DiagCard_AddEdit(diagCard); if (diagCardAE.ShowDialog() == DialogResult.OK) { loadCars(); } } }