示例#1
0
        private void btn_Back_Click(object sender, EventArgs e)
        {
            this.Hide();
            AdminDashboard adminDash = new AdminDashboard();

            adminDash.Show();
        }
示例#2
0
        private void button1_Click(object sender, EventArgs e)
        {
            this.Hide();
            AdminDashboard ad = new AdminDashboard();

            ad.Show();
        }
示例#3
0
 private void btn_SignIn_Click(object sender, EventArgs e)
 {
     if (textBox1.Text != "" && textBox2.Text != "")
     {
         bool login = getLogin(textBox1.Text, textBox2.Text);
         if (login == true)
         {
             this.Close();
             AdminDashboard ADbj = new AdminDashboard();
             ADbj.Show();
         }
         else if (login == false)
         {
             MessageBox.Show("invalid username and password");
         }
     }
     else if (textBox1.Text == "" && textBox2.Text == "")
     {
         MessageBox.Show("Please enter username and password");
     }
 }
示例#4
0
        private void btn_Save_Click(object sender, EventArgs e)
        {
            try
            {
                if (txtbox_FlightName.Text != "")
                {
                    if (dateTimePicker1.Text != "" && dateTimePicker2.Text != "" && comboBox1.Text != "" && comboBox2.Text != "" && txtbox_Amount.Text != "" && comboBox3.Text != "")
                    {
                        if (comboBox1.Text != comboBox2.Text)
                        {
                            CRUDOperation.addFlightInsertion(txtbox_FlightName.Text, comboBox1.Text, comboBox2.Text, dateTimePicker2.Text, dateTimePicker1.Text, comboBox3.Text, Convert.ToInt32(txtbox_Amount.Text));
                            MessageBox.Show("Congrats. New flight has been added in system");

                            this.Hide();
                            AdminDashboard admindash = new AdminDashboard();
                            admindash.Show();
                        }
                        else
                        {
                            MessageBox.Show("Departure and Arrival flights can not be same");
                        }
                    }
                    else
                    {
                        MessageBox.Show("Flight Date/time, Amount and Flight types details are required");
                    }
                }
                else
                {
                    MessageBox.Show("Enter PIA flight name");
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message + " Error occurred");
            }
        }