Пример #1
0
        public void payment()
        {
            TPB      TT  = Application.OpenForms.OfType <TPB>().FirstOrDefault();
            Fursan   l   = new Fursan();
            PlatCard pc  = new PlatCard();
            Airline  air = new Airline();
            double   final;
            double   a  = 2500;
            Hotel    gt = new Hotel();

            final = a + air.tkbill + gt.hbill;
            final = final * 1.24;
            MessageBox.Show("Your Final bill is : " + final, " BILL ", MessageBoxButtons.OK, MessageBoxIcon.Information);
            if (l.check == 1)
            {
                final = final - 500;
                MessageBox.Show("You have recieved a flat discount of 500 PKR for being a Fursan Member , your bill now is : " + final, "Fursan account logged in", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            if (TT.pcard.Checked == true)
            {
                pc.Credit = 200000;
                final     = final * pc.discount;
                MessageBox.Show(Convert.ToString(final));
                pc.Credit = pc.Credit - final;
                MessageBox.Show("YOU HAVE RECIEVED A 25% FOR BEING A PLATCARD OWNER AND YOUR BILL NOW IS : " + final + " \nYour payment has been received ," +
                                " deducted from your credit . Your remaining balance is : " + pc.Credit + " Thank you for choosing BABAJI TRAVEL AGENCY", "Payment Rceived", MessageBoxButtons.OK, MessageBoxIcon.Information);
                TT.Close();
                Home hm = new Home();
                hm.Show();
            }
            else if (TT.gcard.Checked == true)
            {
                GoldCard gc = new GoldCard();
                gc.Credit = 100000;
                final     = final * gc.discount;
                gc.Credit = gc.Credit - final;
                MessageBox.Show("YOU HAVE RECIEVED A 15% FOR BEING A GOLDCARD OWNER AND YOUR BILL NOW IS : " + final + " \nYour payment has been received ," +
                                " deducted from your credit . Your remaining balance is : " + gc.Credit + " Thank you for choosing BABAJI TRAVEL AGENCY", "Payment Rceived", MessageBoxButtons.OK, MessageBoxIcon.Information);
                TT.Hide();
                Home hm = new Home();
                hm.Show();
            }
            else if (TT.ccard.Checked == true)
            {
                Card c = new Card();
                c.Credit = c.Credit - final;
                MessageBox.Show(" YOUR BILL IS : " + final + " Your payment has been received ," +
                                " deducted from your credit . Your remaining balance is : " + c.Credit + " Thank you for choosing BABAJI TRAVEL AGENCY", "Payment Rceived", MessageBoxButtons.OK, MessageBoxIcon.Information);
                TT.Close();
                Home hm = new Home();
                hm.Show();
            }
            else
            {
                MessageBox.Show("Please select card type", "Payment", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
Пример #2
0
 private void button3_Click(object sender, EventArgs e)
 {
     try
     {
         Fursan f = new Fursan();
         f.AssignValues();
     }
     catch (Exception ex)
     { MessageBox.Show(ex.Message, "Exception Unhandled", MessageBoxButtons.OK, MessageBoxIcon.Error); }
 }
Пример #3
0
        private void label2_Click(object sender, EventArgs e)
        {
            Fursan f = new Fursan();

            if (f.check == 1)
            {
                label2.Visible   = true;
                label2.ForeColor = Color.Green;
                label2.Text      = "LOOGED IN ";
            }
            else
            {
                label2.Visible = false;
            }
        }
Пример #4
0
        public void Login()
        {
            Int64  pp;
            string pass;

            pp   = Convert.ToInt64(F.fursanpp.Text);
            pass = F.fursanpass.Text;
            MessageBox.Show(Convert.ToString(pp));
            if (F.fursanpp.Text != "" && F.fursanpass.Text != "" && F.fursanpp.Text.Length == 7)
            {
                string         query1  = "select ppnumber,pass from fursan where ppnumber = '" + pp + "' and pass = '******'";
                SqlDataAdapter adapter = new SqlDataAdapter(query1, connec);
                connec.Open();
                DataTable dt = new DataTable();
                adapter.Fill(dt);
                if (dt.Rows.Count > 0)
                {
                    MessageBox.Show("Log In successful", "Log IN", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    Fursan f = new Fursan();
                    f.check = 1;
                    F.Hide();
                }
                else
                {
                    MessageBox.Show("Incorrect Passport Number or password", "Log In", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
            else
            {
                MessageBox.Show("Incorrect Passport Number or password", "Log In", MessageBoxButtons.OK, MessageBoxIcon.Error);
                if (F.fursanpp.Text.Length != 7)
                {
                    MessageBox.Show("Please enter passport number of 7 digits", "Log In", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
            connec.Close();
        }
Пример #5
0
        private void button2_Click(object sender, EventArgs e)
        {
            Fursan f = new Fursan();

            f.clear();
        }