/// <summary>
        /// check for user login or not
        /// </summary>
        public void check_for_user()
        {
            booking ob_of_booking = new booking();
            Form1   obofform1     = new Form1();
            string  uname         = label8.Text;

            if (string.IsNullOrEmpty(uname) == false)
            {
                user_id = userid;
                if (string.IsNullOrEmpty(locationname) == false)
                {
                    ob_of_booking.Show();
                    this.Hide();
                }
                else
                {
                    MessageBox.Show("select location", "location", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
            else
            {
                obofform1.Show();
                this.Hide();
            }
        }
Exemplo n.º 2
0
        private void button1_Click(object sender, EventArgs e)
        {
            booking obofbooking = new booking();

            obofbooking.Show();
            this.Hide();
        }
        /// <summary>
        /// login or profile button
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void button2_Click(object sender, EventArgs e)
        {
            movesidepenal(button2);
            Form1   obofform1     = new Form1();
            booking ob_of_booking = new booking();

            if (button2.Text == "LOGIN")
            {
                obofform1.Show();
                this.Hide();
            }
            else
            {
                user_id = userid;
                profile obofprofil = new profile();
                obofprofil.Show();
                this.Hide();
            }
        }