private void BtnSignIn_Click(object sender, EventArgs e) { AppUser appUser = new AppUser() { UserName = txtUserName.Text, UserPassword = txtUserPassword.Text }; bool loginControll = loginController.UserSignInControll(appUser); if (loginControll) { HelperStaticClass.appUserStatic = loginController.AppUserGet(appUser); if (HelperStaticClass.guestsDictionery.Count >= 1) { ReservationFinalScreen reservationFinalScreen = new ReservationFinalScreen(); reservationFinalScreen.Show(); } else { ReservationScreen reservationScreen = new ReservationScreen(); reservationScreen.Show(); } this.Hide(); } else { MessageBox.Show("Invalid password or username!"); } }
public void AddReservation() { HelperStaticClass.reservationStatic.AppUserID = HelperStaticClass.appUserStatic.ID; bool result = reservationController.AddReservationController(HelperStaticClass.reservationStatic); if (result) { if (AddReservationRooms()) { MessageBox.Show("Booking completed successfully."); ReservationScreen reservationScreen = new ReservationScreen(); reservationScreen.Show(); mail.SendReservationInfoMail(HelperStaticClass.reservationStatic); Hide(); } else { MessageBox.Show("Reservation room error!"); } } else { MessageBox.Show("Error while adding reservation!!!"); ReservationScreen reservationScreen = new ReservationScreen(); reservationScreen.Show(); Hide(); } }
private void btnBack_Click(object sender, EventArgs e) { ReservationScreen reservationScreen = new ReservationScreen(); reservationScreen.Show(); Hide(); Dispose(); }