private void AP_Add_Flight_Click(object sender, EventArgs e) { //Air_Reservation_DBDataContext aPD = new Air_Reservation_DBDataContext(@"Data Source=(LocalDB)\v11.0;AttachDbFilename=C:\Users\Mzs Munna\documents\visual studio 2013\Projects\Air_Reservation_System\Air_Reservation_System\Air_Reservation.mdf;Integrated Security=True;Connect Timeout=30"); Airline_Reservation_SystemDBCDataContext aPD = new Airline_Reservation_SystemDBCDataContext(@"Data Source=(LocalDB)\v11.0;AttachDbFilename=C:\Users\Mzs Munna\Documents\Visual Studio 2013\Projects\Air_Reservation_System\Air_Reservation_System\Airline_Reservation_System.mdf;Integrated Security=True;Connect Timeout=30"); AddFlightPanel aFF = new AddFlightPanel("Add", AP_Gridview_Display, flightListNo); aFF.Show(); }
private void AP_UpdateF_Click(object sender, EventArgs e) { //Air_Reservation_DBDataContext aPD = new Air_Reservation_DBDataContext(@"Data Source=(LocalDB)\v11.0;AttachDbFilename=C:\Users\Mzs Munna\documents\visual studio 2013\Projects\Air_Reservation_System\Air_Reservation_System\Air_Reservation.mdf;Integrated Security=True;Connect Timeout=30"); Airline_Reservation_SystemDBCDataContext aPD = new Airline_Reservation_SystemDBCDataContext(@"Data Source=(LocalDB)\v11.0;AttachDbFilename=C:\Users\Mzs Munna\Documents\Visual Studio 2013\Projects\Air_Reservation_System\Air_Reservation_System\Airline_Reservation_System.mdf;Integrated Security=True;Connect Timeout=30"); if (currentGridView == "Flight Details") { AddFlightPanel aFF = new AddFlightPanel("Update", AP_Gridview_Display, flightListNo); aFF.Show(); } else { MessageBox.Show("Currently Displaying " + currentGridView + " Table!!"); } }