Пример #1
0
 private void button5_Click(object sender, EventArgs e)
 {
     try
     {
         Visa vs = new Visa();
         vs.uploadPhoto();
     }
     catch (Exception ex) { MessageBox.Show(ex.Message, "Exception Unhandled", MessageBoxButtons.OK, MessageBoxIcon.Error); }
 }
Пример #2
0
        public HOTEL()
        {
            InitializeComponent();
            Visa vs = new Visa();

            hpp.Text     = Convert.ToString(vs.PassportNumber);
            hflname.Text = vs.LastName;
            hfname.Text  = vs.FirstName;
        }
Пример #3
0
 private void button3_Click(object sender, EventArgs e)
 {
     try
     {
         Visa VS = new Visa();
         VS.AssignValues();
         Airline air = new Airline();
         air.passing();
         this.Hide();
     }
     catch (Exception ex) { MessageBox.Show(ex.Message, "Exception Unhandled", MessageBoxButtons.OK, MessageBoxIcon.Error); }
 }
Пример #4
0
        public void passing()
        {
            Visa vs = new Visa();

            try
            {
                hchange.hfname.Text  = CHANGE.vsfname.Text;
                hchange.hflname.Text = CHANGE.vslname.Text;
                hchange.hpp.Text     = (CHANGE.vsppnumber.Text);
            }
            catch (Exception ex) { MessageBox.Show(ex.Message, "Exception unhandled", MessageBoxButtons.OK, MessageBoxIcon.Error); }
        }
Пример #5
0
        public void ApplyVisa(string ab, string b, int c, string d, Int64 e, string f, string g, string h)
        {
            Visa vs = new Visa();

            this.FirstName      = ab;
            this.LastName       = b;
            this.Age            = c;
            this.nationality    = d;
            this.PassportNumber = e;
            this.email          = f;
            this.residency      = g;
            vs.visatype         = h;
            connec.Open();
            string     query   = "insert into VISAAPPLICATIONS values (@fname,@lname,@age,@nationality,@ppnumber,@email,@residency,@visatype,@photo)";
            SqlCommand command = new SqlCommand(query, connec);

            command.Parameters.AddWithValue("@fname", FirstName);;
            command.Parameters.AddWithValue("@lname", LastName);
            command.Parameters.AddWithValue("@age", Age);
            command.Parameters.AddWithValue("@nationality", nationality);
            command.Parameters.AddWithValue("@ppnumber", PassportNumber);
            command.Parameters.AddWithValue("@email", email);
            command.Parameters.AddWithValue("@residency", residency);
            command.Parameters.AddWithValue("@visatype", vs.visatype);
            command.Parameters.AddWithValue("@photo", vs.SaveImage());
            int a = command.ExecuteNonQuery();

            if (a > 0)
            {
                MessageBox.Show("Your Visa application has been submitted , You can proceed towards ticket booking now .",
                                "Visa Succesfully Applied", MessageBoxButtons.OK, MessageBoxIcon.Information);
                vs.ShowBill();
                TICKET tk = new TICKET();
                tk.Show();
                VISA VS = new VISA();
                VS.Hide();
            }
            else
            {
                MessageBox.Show("Visa Application submission unsuccesful .", "Apply Visa", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            connec.Close();
        }
Пример #6
0
        private void button1_Click(object sender, EventArgs e)
        {
            Visa vs = new Visa();

            vs.ClearData();
        }