public void AssignValues()
      {
          if (fs.fursanaccfname.Text != "" && fs.fursanacclname.Text != "" && fs.fursannationality.Text != "" && fs.fursanaccpp.Text != "" &&
              fs.fursanaccpass.Text != "" && fs.fursanacccnfrmpass.Text != "" && fs.fursanaccpass.Text == fs.fursanacccnfrmpass.Text && fs.fursanaccpp.Text.Length == 7)
          {
              FirstName      = fs.fursanaccfname.Text;
              LastName       = fs.fursanacclname.Text;
              nationality    = fs.fursannationality.Text;
              PassportNumber = Convert.ToInt64(fs.fursanaccpp.Text);
              password       = fs.fursanaccpass.Text;
              DOperations dao = new DOperations();
              dao.signup(FirstName, LastName, nationality, PassportNumber, password);
          }

          else
          {
              if (fs.fursanaccfname.Text == "" || fs.fursanacclname.Text == "" || fs.fursannationality.Text == "" || fs.fursanaccpp.Text == "" ||
                  fs.fursanaccpass.Text == "" || fs.fursanacccnfrmpass.Text == "")
              {
                  MessageBox.Show("Please fill in all the fields", "Fields Mising", MessageBoxButtons.OK, MessageBoxIcon.Error);
              }
              if (fs.fursanaccpass.Text != fs.fursanacccnfrmpass.Text)
              {
                  MessageBox.Show("Your entered password and confirm passwords do not match", "Fursan Signup", MessageBoxButtons.OK, MessageBoxIcon.Error);
              }
              if (fs.fursanaccpp.Text.Length != 7)
              {
                  MessageBox.Show("Please enter a passport number of 7 digits", "SIGN UP", MessageBoxButtons.OK, MessageBoxIcon.Error);
              }
          }
      }
 private void button1_Click(object sender, EventArgs e)
 {
     try
     {
         DOperations dao = new DOperations();
         dao.UDVisa("e");
     }
     catch (Exception ex) { MessageBox.Show(ex.Message, "Exception Unhandled", MessageBoxButtons.OK, MessageBoxIcon.Error); }
 }
Exemple #3
0
 private void button2_Click(object sender, EventArgs e)
 {
     try
     {
         DOperations dao = new DOperations();
         dao.Login();
         Home hm = new Home();
         hm.Show();
     }
     catch (Exception ex) { MessageBox.Show(ex.Message, "Exception Unhandled", MessageBoxButtons.OK, MessageBoxIcon.Error); }
 }
        public void AssignValues()
        {
            int a = 0;

            if (Regex.IsMatch(CHANGE.vsemailid.Text, @"\A[a-z0-9]+([-._][a-z0-9]+)*@([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,4}\z"))
            {
                email = CHANGE.vsemailid.Text;
            }
            else
            {
                a++;
            }
            if (CHANGE.vsfname.Text != "" && CHANGE.vslname.Text != "" && CHANGE.vsageupdown.Value != 0 && CHANGE.vsnatiionality.Text != "" &&
                CHANGE.vsppnumber.Text != "" && CHANGE.vsemailid.Text != "" && CHANGE.vsaddress.Text != "" && CHANGE.vsvisatype.Text != "" &&
                CHANGE.vsppnumber.Text.Length < 8 && CHANGE.vsppnumber.Text.Length > 6 && a == 0 && CHANGE.photo.Image != null)
            {
                FirstName      = CHANGE.vsfname.Text;
                LastName       = CHANGE.vslname.Text;
                Age            = Convert.ToInt32(CHANGE.vsageupdown.Value);
                nationality    = CHANGE.vsnatiionality.Text;
                PassportNumber = Convert.ToInt64(CHANGE.vsppnumber.Text);
                residency      = CHANGE.vsaddress.Text;
                visatype       = CHANGE.vsvisatype.Text;
                ShowInformation();

                DOperations dao = new DOperations();
                dao.ApplyVisa(FirstName, LastName, Age, nationality, PassportNumber, email, residency, visatype);
            }

            else
            {
                if (a != 0)
                {
                    MessageBox.Show("Please enter a valid email address. ", "Invalid Email Entered", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
                if (CHANGE.vsppnumber.TextLength != 7)
                {
                    MessageBox.Show("Please enter a passport number which has 7 digits", "Invalid Passport Number", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
                if (CHANGE.photo.Image == null)
                {
                    MessageBox.Show("Please upload a recent passport size photo", "NO photo Uploaded", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
                if (CHANGE.vsfname.Text == "" || CHANGE.vslname.Text == "" || CHANGE.vsageupdown.Value == 0 || CHANGE.vsnatiionality.Text == "" ||
                    CHANGE.vsppnumber.Text == "" || CHANGE.vsemailid.Text == "" || CHANGE.vsaddress.Text == "" || CHANGE.vsvisatype.Text == "")
                {
                    MessageBox.Show("Please Fill in All the Fields ", "Fields Missing", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                }
            }
        }
        private void button3_Click(object sender, EventArgs e)
        {
            DOperations dao = new DOperations();

            try
            {
                Hotel ht = new Hotel();
                ht.Hotels();
                ht.Assignvalues();
                TPB     TP = new TPB();
                Payment tp = new Payment();
                tp.show();
                TP.Show();
                this.Hide();
            }
            catch (Exception ex) { MessageBox.Show(ex.Message, "Exception Unhandled", MessageBoxButtons.OK, MessageBoxIcon.Error); }
        }
        public void Assignvalues()
        {
            HOTEL ht = new HOTEL();

            if (ht.hotelname.Text != "" && ht.roomtype.Text != "" && ht.roomsno.Value != 0 && ht.transport.Text != "" &&
                ht.days.Value != 0)
            {
                MessageBox.Show("Please fill all teh fields", "Fields Missing", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
            else
            {
                hname     = hchange.hotelname.Text;
                roomtype  = hchange.roomtype.Text;
                rooms     = Convert.ToInt32(hchange.roomsno.Value);
                transport = hchange.transport.Text;
                days      = Convert.ToInt32(hchange.days.Value);
                if (hchange.hspecial.Checked == true)
                {
                    hbill += 50;
                }
                if (hchange.hvegan.Checked == true)
                {
                    hbill += 100;
                }
                else
                {
                    hchange.hregular.Checked = true; hbill += 20;
                }
                if (hchange.hundredmbs.Checked == true)
                {
                    hbill += 100;
                }
                else
                {
                    hchange.fiftymbs.Checked = true; hbill += 50;
                }
                int a = Convert.ToInt32(hchange.roomsno.Value) * rate;
                hbill += Convert.ToInt32(ht.days.Value) * a;
                MessageBox.Show(hname);
                DOperations dao = new DOperations();
                dao.bookhotel(hname, rooms, days, transport, roomtype);
                ShowInformation();
                ShowBill();
            }
        }
 public void AssignValues()
 {
     if (tkchange.flightoperators.Text != null && tkchange.arrivalairports.Text != null && tkchange.tkpassengers.Value != 0 && tkchange.tkDF.Checked != false || tkchange.tkMC.Checked != false)
     {
         depdate        = tkchange.tkdepdate.Text;
         returndate     = tkchange.tkreturndate.Text;
         arrivalairport = tkchange.arrivalairports.Text;
         via            = tkchange.tklayover.Text;
         ope            = tkchange.flightoperators.Text;
         if (tkchange.tkfirst.Checked == true)
         {
             trclass = tkchange.tkfirst.Text;
         }
         if (tkchange.tkbuisness.Checked == true)
         {
             trclass = tkchange.tkbuisness.Text;
         }
         else
         {
             trclass = tkchange.tkeconomy.Text;
         }
         if (tkchange.tkDF.Checked == true)
         {
             DOperations dao = new DOperations();
             dao.dest(Convert.ToInt64(CHANGE.vsppnumber.Text), CHANGE.vsfname.Text, CHANGE.vslname.Text, depdate, returndate, "KARACHI , KHI", arrivalairport, ope, trclass);
         }
         if (tkchange.tkMC.Checked == true)
         {
             DOperations dao = new DOperations();
             dao.dest(Convert.ToInt64(CHANGE.vsppnumber.Text), CHANGE.vsfname.Text, CHANGE.vslname.Text, depdate, returndate, "KARACHI , KHI", arrivalairport, via, ope, trclass);
         }
     }
     else
     {
         MessageBox.Show("Please Fill in All the Fields ", "Fields Missing", MessageBoxButtons.OK, MessageBoxIcon.Warning);
     }
 }