Tuesday, March 1, 2016

Tuazon, Bong Kenneth

SCREENSHOTS










CODES

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Ordering_System
{
    public partial class Login : Form
    {
        public Login()
        {
            InitializeComponent();
        }

        private void btn_login_Click(object sender, EventArgs e)
        {
            if (txt_user1.Text == "Boooong" && txt_pass1.Text == "batman")
            {
                Profile newform = new Profile();
                newform.Show();
                this.Hide();
            }
            else
            {
                MessageBox.Show("Retype your username/password.", "INCORRECT USERNAME/PASSWORD!", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
    }
}


using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Ordering_System
{
    public partial class Profile : Form
    {
        public Profile()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            Order newform = new Order();
            newform.Show();
            this.Hide();
        }
    }
}


using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Ordering_System
{
    public partial class Order : Form
    {
        public Order()
        {
            InitializeComponent();
        }

        private void mcDonaldsToolStripMenuItem_Click(object sender, EventArgs e)
        {
            picbox1.Image = Ordering_System.Properties.Resources.mcdo;
            cbo1.Text = "";
            cbo1.Items.Clear();
            cbo1.Items.Add("BFF Fries 'n Float Bundle");
            cbo1.Items.Add("BFF Mix Bundle");
        }

        private void Main_Load(object sender, EventArgs e)
        {

        }

        private void btn_compute_Click(object sender, EventArgs e)
        {
            if (txt_qty.Text == "")
            {
                MessageBox.Show("Please specify a quantity.", "Error!", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            else
            {
                Double a = Convert.ToDouble(lbl_price.Text);
                Double b = Convert.ToDouble(txt_qty.Text);
                Double c = a * b;
                lbl_total.Text = c.ToString();
            }
        }

        private void cbo1_SelectedIndexChanged_1(object sender, EventArgs e)
        {
            if (cbo1.Text == "BFF Mix Bundle")
            {
                lbl1.Text = "4 BFF Burgers";
                lbl2.Text = "2 BFF Fries";
                lbl3.Text = "2 1pc Chicken with Spaghetti";
                lbl4.Text = "4 Large Coke";
                lbl5.Text = "4 Apple Pie";
                lbl6.Text = "4 McFlurry";
                lbl_price.Text = "850.00";
                txt_qty.Text = "1";
            }
            else if (cbo1.Text == "BFF Fries 'n Float Bundle")
            {
                lbl1.Text = "1 BFF Fries";
                lbl2.Text = "3 Monster Floats";
                lbl3.Text = "3 Apple Pie";
                lbl4.Text = "3 McFlurry";
                lbl5.Text = "";
                lbl6.Text = "";
                lbl_price.Text = "366.00";
                txt_qty.Text = "1";
            }
            else if (cbo1.Text == "6pc Chickenjoy Bucket Meal")
            {
                lbl1.Text = "6pc Chickenjoy";
                lbl2.Text = "3 Gravy";
                lbl3.Text = "3 Peach Mango Pie";
                lbl4.Text = "3 Cheesy Bacon Mushroom Yum";
                lbl5.Text = "3 Large Coke";
                lbl6.Text = "3 Jolly Spaghetti";
                lbl_price.Text = "868.85";
                txt_qty.Text = "1";
            }
            else if (cbo1.Text == "8pc Chickenjoy Bucket Meal")
            {
                lbl1.Text = "8pc Chickenjoy";
                lbl2.Text = "4 Gravy";
                lbl3.Text = "4 Peach Mango Pie";
                lbl4.Text = "4 Cheesy Bacon Mushroom Yum";
                lbl5.Text = "4 Large Coke";
                lbl6.Text = "4 Jolly Spaghetti";
                lbl_price.Text = "1161.30";
                txt_qty.Text = "1";
            }
            else if (cbo1.Text == "Family Treat")
            {
                lbl1.Text = "10pc Chicken";
                lbl2.Text = "2 Zinger Wings";
                lbl3.Text = "5 Sparkling Crushers";
                lbl4.Text = "5 Regular Mashed Potatoes";
                lbl5.Text = "5 Regular Coleslaw";
                lbl6.Text = "5 Snack Burgers";
                lbl_price.Text = "353.40";
                txt_qty.Text = "1";
            }
            else if (cbo1.Text == "Family Bucket Meal")
            {
                lbl1.Text = "10pc Chicken";
                lbl2.Text = "5 Large Mashed Potatoes";
                lbl3.Text = "5 Regular Coleslaw";
                lbl4.Text = "10pc Extra Rice";
                lbl5.Text = "5 Extra Gravy";
                lbl6.Text = "5 Large Chips";
                lbl_price.Text = "1018.50";
                txt_qty.Text = "1";
            }
        }

        private void logoutToolStripMenuItem_Click(object sender, EventArgs e)
        {
            MessageBox.Show("You are about to logout.", "Logging out", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            Login newform = new Login();
            newform.Show();
            this.Hide();
        }

        private void jollibeeToolStripMenuItem_Click_1(object sender, EventArgs e)
        {
            picbox1.Image = Ordering_System.Properties.Resources.jollibee1;
            cbo1.Text = "";
            cbo1.Items.Clear();
            cbo1.Items.Add("6pc Chickenjoy Bucket Meal");
            cbo1.Items.Add("8pc Chickenjoy Bucket Meal");
        }

        private void kFCToolStripMenuItem_Click_1(object sender, EventArgs e)
        {
            picbox1.Image = Ordering_System.Properties.Resources.kfc1;
            cbo1.Text = "";
            cbo1.Items.Clear();
            cbo1.Items.Add("Family Treat");
            cbo1.Items.Add("Family Bucket Meal");
        }

        private void btn_purchase_Click_1(object sender, EventArgs e)
        {
            MessageBox.Show("You have to fill up a form in order to complete the transaction.", "You are almost finish!", MessageBoxButtons.OK, MessageBoxIcon.Error);
            Complete newform = new Complete();
            newform.Show();
            this.Hide();

        }

        private void btn_add_Click_1(object sender, EventArgs e)
        {
            if (cbo1.Text == "")
            {
                MessageBox.Show("Please specify an order.", "Error!", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            Double d = Convert.ToDouble(lbl_total.Text);
            Double f = Convert.ToDouble(lbl_grand.Text);
            Double g = d + f;
            lbl_grand.Text = g.ToString();
            list_1.Items.Add(cbo1.Text);
            list_2.Items.Add(lbl1.Text);
            list_2.Items.Add(lbl2.Text);
            list_2.Items.Add(lbl3.Text);
            list_2.Items.Add(lbl4.Text);
            list_2.Items.Add(lbl5.Text);
            list_2.Items.Add(lbl6.Text);
        }

        private void btn_repick_Click_1(object sender, EventArgs e)
        {
            picbox1.Image = Ordering_System.Properties.Resources.unknown;
            cbo1.Items.Clear();
            cbo1.Text = "";
            lbl1.Text = "";
            lbl2.Text = "";
            lbl3.Text = "";
            lbl4.Text = "";
            lbl5.Text = "";
            lbl6.Text = "";
            lbl_price.Text = "";
            lbl_total.Text = "0";
            txt_qty.Text = "";
        }

        private void button1_Click(object sender, EventArgs e)
        {
            if (list_1.Text == "" && list_2.Text == "")
            {
                MessageBox.Show("Cart is already empty.", "Oops!", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            list_1.Items.Clear();
            list_2.Items.Clear();
        }
    }
}


using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Ordering_System
{
    public partial class Complete : Form
    {
        public Complete()
        {
            InitializeComponent();
        }

        private void btn_send_Click(object sender, EventArgs e)
        {
            if (txt_last.Text == "")
            {
                MessageBox.Show("Please do not leave your last name blank.", "Error!", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            else if (txt_first.Text == "")
            {
                MessageBox.Show("Please do not leave your first name blank.", "Error!", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            else if (txt_mid.Text == "")
            {
                MessageBox.Show("Please do not leave your middle name blank.", "Error!", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            else if (txt_num.Text == "")
            {
                MessageBox.Show("Please do not leave your contact number blank.", "Error!", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            else if (txt_email.Text == "")
            {
                MessageBox.Show("Please do not leave your email address blank.", "Error!", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            else if (txt_home.Text == "")
            {
                MessageBox.Show("Please do not leave your home address blank.", "Error!", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            else
            {
                MessageBox.Show("Now that we have your basic information, we will surely send your order to your home address. Thank you for choosing our ordering system.", "Transaction complete!", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
            }

            
        }
    }
}

PERSONAL INFORMATION


I'm Bong Kenneth Tuazon, 16 years old, I'm a freshman at South Mansfield College taking up BSIT, Single ❤️. Basketball player. Follow me at twitter.com/boooong_ and at instagram.com/booooong_ .



5 comments: