private void _dgvDTP_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { if (isCellNoHeader(e.RowIndex)) { int idDTP = Convert.ToInt32(_dgvDTP.Rows[e.RowIndex].Cells[0].Value); DTP dtp = dtpList.getItem(idDTP); DTP_AddEdit aedtp = new DTP_AddEdit(dtp); aedtp.ShowDialog(); } }
private void _dgvDTP_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { int idDTP = Convert.ToInt32(_dgvDTP.Rows[e.RowIndex].Cells[0].Value); DTP dtp = dtpList.getItem(idDTP); DTP_AddEdit dtpAE = new DTP_AddEdit(dtp); if (dtpAE.ShowDialog() == System.Windows.Forms.DialogResult.OK) { loadDTP(); } }
private void btnAddDTP_Click(object sender, EventArgs e) { DTP dtp = _car.createDTP(); DTP_AddEdit dtpAE = new DTP_AddEdit(dtp); if (dtpAE.ShowDialog() == System.Windows.Forms.DialogResult.OK) { dtpList.Add(dtp); loadDTP(); } }
private void DoubleClickDTP(Point point) { if (_dgvMain.GetID() == 0) { return; } DTPList dtpList = DTPList.getInstance(); DTP dtp = dtpList.getItem(_dgvMain.GetID()); DTP_AddEdit dtpAE = new DTP_AddEdit(dtp); if (dtpAE.ShowDialog() == DialogResult.OK) { loadCars(); } }
private ToolStripMenuItem CreateNewDTP() { ToolStripMenuItem item = CreateItem("Новое ДТП"); item.Click += delegate { Car car = _dgvMain.GetCar(); if (car == null) { return; } DTP dtp = car.createDTP(); DTP_AddEdit dtpAE = new DTP_AddEdit(dtp); dtpAE.ShowDialog(); }; return(item); }
private ToolStripMenuItem CreateNewDTP() { ToolStripMenuItem item = CreateItem("Новое ДТП"); item.Click += delegate { Car car = _dgvMain.GetCar(); if (car == null) return; DTP dtp = car.createDTP(); DTP_AddEdit dtpAE = new DTP_AddEdit(dtp); dtpAE.ShowDialog(); }; return item; }
private void _dgvDTP_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { int idDTP = Convert.ToInt32(_dgvDTP.Rows[e.RowIndex].Cells[0].Value); DTP dtp = dtpList.getItem(idDTP); DTP_AddEdit dtpAE = new DTP_AddEdit(dtp); if (dtpAE.ShowDialog() == System.Windows.Forms.DialogResult.OK) loadDTP(); }
private void Add_Click(object sender, EventArgs e) { DTP_AddEdit aedtp = new DTP_AddEdit(car.createDTP()); aedtp.ShowDialog(); }
private void DoubleClickDTP(Point point) { if (_dgvMain.GetID() == 0) return; DTPList dtpList = DTPList.getInstance(); DTP dtp = dtpList.getItem(_dgvMain.GetID()); DTP_AddEdit dtpAE = new DTP_AddEdit(dtp); if (dtpAE.ShowDialog() == DialogResult.OK) { loadCars(); } }