private void button3_Click(object sender, EventArgs e)
        {
            ForJourney fr = new ForJourney();

            fr.Show();
            this.Hide();
        }
示例#2
0
        private void button2_Click(object sender, EventArgs e)
        {
            bool found = false;
            busticketDataContext db = new busticketDataContext();
            string email            = textBox1.Text;
            string password         = textBox2.Text;

            if (email.Equals("cc") && password.Equals("ccc"))
            {
                this.Hide();
                AdminPanel a = new AdminPanel();
                a.Show();
            }
            else
            {
                foreach (var item in db.Users)
                {
                    if (email.Equals(item.email) && password.Equals(item.password))
                    {
                        MessageBox.Show("You are a member");

                        found = true;
                        ForJourney j = new ForJourney();
                        j.Show();
                        this.Hide();
                        break;
                    }
                }
                if (!found)
                {
                    MessageBox.Show("You are not a member");
                }
            }
        }
        private void Ticket_Load(object sender, EventArgs e)
        {
            Trip trip = new Trip();

            trip = ForJourney.return_trip();

            textBox5.Text = trip.busName;
            textBox6.Text = trip.category;
            textBox7.Text = trip.route;
            textBox8.Text = trip.schedual;

            textBox9.Text = ForJourney.seat;
        }
        private void ForPayment_Load(object sender, EventArgs e)
        {
            Trip trip = ForJourney.return_trip();

            textBox1.Text = trip.rent;
        }