Beispiel #1
0
        private void rentButtonClicked()
        {
            string plateNum = "";

            if (dataGridViewAvailableVehicles.SelectedCells.Count > 0)
            {
                int a = dataGridViewAvailableVehicles.SelectedCells[0].RowIndex;
                plateNum = dataGridViewAvailableVehicles.Rows[a].Cells[0].Value.ToString();
            }

            rentvehiclecontrol.SelectVehicle(plateNum);
        }
        private void rentButtonClicked()
        {
            string plateNum = "";

            if (dataGridViewAvailableVehicles.SelectedCells.Count > 0)
            {
                int a = dataGridViewAvailableVehicles.SelectedCells[0].RowIndex;
                plateNum = dataGridViewAvailableVehicles.Rows[a].Cells[0].Value.ToString();
            }

            //Rent button is grayed out
            //only after a selection is made,

            rentvehiclecontrol.SelectVehicle(plateNum);
        }