private void button2_Click(object sender, EventArgs e)
        {
            using (var db = new Session3Entities())
            {
                var q = db.Hotel_Booking.Where(x => x.userIdFK == users.userId).FirstOrDefault();
                if (q != null)
                {
                    MessageBox.Show("You have already made a hotel selection!");
                    return;
                }
            }
            this.Hide();
            HotelSelection hotalBooking = new HotelSelection(users);

            hotalBooking.Show();
        }
예제 #2
0
 private void hotel_button_Click(object sender, EventArgs e)
 {
     if (loggedIn.userTypeIdFK == 2)
     {
         this.Hide();
         var form = new HotelSelection(loggedIn);
         form.Closed += (s, args) => this.Close();
         form.Show();
     }
     else
     {
         this.Hide();
         var form = new HotelSummary(loggedIn);
         form.Closed += (s, args) => this.Close();
         form.Show();
     }
 }