Example #1
0
        private void btnAddShipPart_Click(object sender, EventArgs e)
        {
            ShipPart         shipPart   = _car.createShipPart();
            ShipPart_AddEdit shipPartAE = new ShipPart_AddEdit(shipPart);

            if (shipPartAE.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                _shipPartList.Add(shipPart);
                loadShipPart();
            }
        }
Example #2
0
        private void dgvShipPart_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            int idShipPart = 0;

            int.TryParse(dgvShipPart.Rows[e.RowIndex].Cells[0].Value.ToString(), out idShipPart);

            ShipPart         shipPart   = _shipPartList.getItem(idShipPart);
            ShipPart_AddEdit shipPartAE = new ShipPart_AddEdit(shipPart);

            if (shipPartAE.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                loadShipPart();
            }
        }
Example #3
0
        private void DoubleClickShipPart(Point point)
        {
            if (_dgvMain.GetID() == 0)
            {
                return;
            }

            ShipPartList shipPartList = ShipPartList.getInstance();
            ShipPart     shipPart     = shipPartList.getItem(_dgvMain.GetID());

            ShipPart_AddEdit shipPartAE = new ShipPart_AddEdit(shipPart);

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