private void passengergridview_CellMouseClick(object sender, DataGridViewCellMouseEventArgs e) { Passenger passenger = new Passenger(); PassengerServices passengerServices = new PassengerServices(); String passportNo = updatepassengergridview.CurrentRow.Cells[2].Value.ToString(); passenger.Passport_No = passportNo; UpdatePassengerDetails updatepasengerdetails = new UpdatePassengerDetails(passengerServices.GetByPassport(passenger)); this.Hide(); updatepasengerdetails.Closed += (s, args) => this.Close(); updatepasengerdetails.Show(); }
private void passengerGridView_CellClick(object sender, DataGridViewCellEventArgs e) { Passenger passenger = new Passenger(); PassengerServices passengerServices = new PassengerServices(); String passportno = searchTextbox.Text; passenger.Passport_No = passportno; UpdatePassengerDetails updatepasengerdetails = new UpdatePassengerDetails(passengerServices.GetByPassport(passenger)); this.Hide(); updatepasengerdetails.Closed += (s, args) => this.Close(); updatepasengerdetails.Show(); }