The Jollibee Phenomenon
Screenshots
First the Admin need to login before you can choose your order.
Next is click the Order so you can proceed to the Menu.
Company Profile concise description which, among other items of information.
Mission and Vision is an aspirational description of what an organization would like to achieve or
accomplish in the mid-term or long-term future. It is intended
to serves as a clear guide for choosing current and future courses of action. See
also mission statement.
In this form you can read the history of Jollibee.
Here you have the Menu, now you can choose the foods you like.
Documentation
Codes
Form 1
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace EncisoFinals
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void btnLogin_Click(object sender, EventArgs e)
{
if (txtUser.Text.Equals("Jessa") && txtPassword.Text.Equals("14"))
{
MessageBox.Show("Welcome to Jollibee!");
this.Hide();
Form2 newForm = new Form2();
newForm.Show();
}
else
{
MessageBox.Show("log in failed!please contact the administrator");
}
}
private void Form1_Load(object sender, EventArgs e)
{
}
}
}
Form 2
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace EncisoFinals
{
public partial class Form2 : Form
{
public Form2()
{
InitializeComponent();
}
private void logOutToolStripMenuItem_Click(object sender, EventArgs e)
{
this.Hide();
Form1 newForm = new Form1();
newForm.Show();
}
private void profileToolStripMenuItem_Click(object sender, EventArgs e)
{
this.Hide();
Form3 newForm = new Form3();
newForm.Show();
}
private void visionMissionToolStripMenuItem_Click(object sender, EventArgs e)
{
this.Hide();
Form4 newForm = new Form4();
newForm.Show();
}
private void histToolStripMenuItem_Click(object sender, EventArgs e)
{
this.Hide();
Form5 newForm = new Form5();
newForm.Show();
}
private void backgroundToolStripMenuItem_Click(object sender, EventArgs e)
{
}
private void orderToolStripMenuItem_Click(object sender, EventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
Form8 frm = new Form8();
frm.Show();
this.Hide();
}
private void proposedProjectToolStripMenuItem_Click(object sender, EventArgs e)
{
}
}
}
Form 3
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace EncisoFinals
{
public partial class Form3 : Form
{
public Form3()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
Form2 frm = new Form2();
frm.Show();
this.Hide();
}
}
}
Form 4
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace EncisoFinals
{
public partial class Form4 : Form
{
public Form4()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
Form2 frm = new Form2();
frm.Show();
this.Hide();
}
}
}
Form 5
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace EncisoFinals
{
public partial class Form5 : Form
{
public Form5()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
Form2 frm = new Form2();
frm.Show();
this.Hide();
}
}
}
Form 8
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Data.OleDb;
namespace EncisoFinals
{
public partial class Form8 : Form
{
public Form8()
{
InitializeComponent();
}
private void pictureBox1_Click(object sender, EventArgs e)
{
txtProduct.Text = "Burger";
txtPrice.Text = "25";
}
private void pictureBox3_Click(object sender, EventArgs e)
{
txtProduct.Text = "Sundae";
txtPrice.Text = "25";
}
private void pictureBox2_Click(object sender, EventArgs e)
{
txtProduct.Text = "Chicken with rice";
txtPrice.Text = "80";
}
private void pictureBox4_Click(object sender, EventArgs e)
{
txtProduct.Text = "Fries";
txtPrice.Text = "49";
}
private void pictureBox5_Click(object sender, EventArgs e)
{
txtProduct.Text = "Spaghetti with chicken";
txtPrice.Text = "85";
}
private void txtQty_TextChanged(object sender, EventArgs e)
{
}
private void btnCompute_Click(object sender, EventArgs e)
{
double a = Convert.ToDouble(txtPrice.Text);
double b = Convert.ToDouble(txtQty.Text);
double c = a * b;
txttotal.Text = c.ToString();
}
private void Form8_Load(object sender, EventArgs e)
{
loadlist();
}
private void button1_Click(object sender, EventArgs e)
{
if (txtProduct.Text == "" || txtPrice.Text == "" || txtQty.Text == "" || txttotal.Text == "")
{
MessageBox.Show("please complete all details");
}
else
{
OleDbConnection con = new OleDbConnection("Provider = microsoft.jet.OLEDB.4.0;Data Source= " + Environment.CurrentDirectory + "\\db.mdb");
String query = "INSERT INTO tblperson ([Product], [Price], [Qty], [Total]) VALUES ('" + txtProduct.Text + "'," + txtPrice.Text + "," + txtQty.Text + ", " + txttotal.Text + ")";
OleDbCommand cmd = new OleDbCommand(query, con);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
loadlist();
MessageBox.Show("Succesfully Addded");
txtProduct.Text = "";
txtPrice.Text = "";
txtQty.Text = "";
txttotal.Text = "";
}
}
private void loadlist()
{
OleDbConnection con = new OleDbConnection("Provider = Microsoft.Jet.OLEDB.4.0;Data Source = " + Environment.CurrentDirectory + "\\db.mdb");
string query = "SELECT * FROM tblperson";
OleDbCommand cmd = new OleDbCommand(query, con);
con.Open();
OleDbDataReader reader = cmd.ExecuteReader();
listView1.Items.Clear();
while (reader.Read())
{
string[] sulat = new string[7];
ListViewItem itm;
sulat[0] = reader["Product"].ToString();
sulat[1] = reader["Price"].ToString();
sulat[2] = reader["Qty"].ToString();
sulat[3] = reader["Total"].ToString();
itm = new ListViewItem(sulat);
listView1.Items.Add(itm);
}
}
private void txtPrice_TextChanged(object sender, EventArgs e)
{
}
private void button2_Click(object sender, EventArgs e)
{
Form2 frm = new Form2();
frm.Show();
this.Hide();
}
private void txtPrice_KeyPress(object sender, KeyPressEventArgs e)
{
if (!char.IsControl(e.KeyChar)
&& !char.IsDigit(e.KeyChar)
&& e.KeyChar != '.')
{
e.Handled = true;
}
// only allow one decimal point
if (e.KeyChar == '.'
&& (sender as TextBox).Text.IndexOf('.') > -1)
{
e.Handled = true;
}
}
private void txtQty_KeyPress(object sender, KeyPressEventArgs e)
{
if (!char.IsControl(e.KeyChar)
&& !char.IsDigit(e.KeyChar)
&& e.KeyChar != '.')
{
e.Handled = true;
}
// only allow one decimal point
if (e.KeyChar == '.'
&& (sender as TextBox).Text.IndexOf('.') > -1)
{
e.Handled = true;
}
}
private void txtTotal_KeyPress(object sender, KeyPressEventArgs e)
{
if (!char.IsControl(e.KeyChar)
&& !char.IsDigit(e.KeyChar)
&& e.KeyChar != '.')
{
e.Handled = true;
}
// only allow one decimal point
if (e.KeyChar == '.'
&& (sender as TextBox).Text.IndexOf('.') > -1)
{
e.Handled = true;
}
}
private void pictureBox6_Click(object sender, EventArgs e)
{
txtProduct.Text = "Ultimate burger steak";
txtPrice.Text = "119";
}
}
}
Hi everyone! My name is Jessa. I'm 18 years old. Studying BSIT at South Mansfield College. I love playing badminton and listening to music.
- God is always with you... You just need to pay attention.
God Bless Us :)
No comments:
Post a Comment