private void button5_Click(object sender, EventArgs e) { //show bill by bill id (customer enters id) bill g = new bill(); customer1 l = new customer1(); string o = textBox3.Text; bool done = false; for (int i = 0; i < bills.Count; i++) { if (bills[i].id == int.Parse(o) && bills[i].customer_email == curraccount.email) { done = true; g.customer_email = bills[i].customer_email; g.delivry_name = bills[i].delivry_name; g.id = bills[i].id; g.products = bills[i].products; g.total_price = bills[i].total_price; l.address = curraccount.address; l.phone = curraccount.phone; g.delivry_data = bills[i].delivry_data; Order_Bill j = new Order_Bill(g, l); j.Show(); break; } } if (done == false) { MessageBox.Show("No Bill with that ID"); } textBox3.Text = ""; }
private void button1_Click(object sender, EventArgs e) { customer1 h = new customer1(); Register_menu rm = new Register_menu(); this.Hide(); rm.Show(); C.Add(h); }
private void button7_Click(object sender, EventArgs e) { //Show Customer bills (the manager enters customer email) <<<<<<<<<<<<<<<<<<<<<<<<<<< bill g = new bill(); customer1 l = new customer1(); bool exist = false; string s = textBox8.Text; for (int i = 0; i < C.Count; i++) { if (C[i].email == s) { exist = true; for (int y = 0; y < bills.Count; y++) { if (bills[y].customer_email == s && bills[y].customer_email == C[i].email) { g.customer_email = C[i].email; g.delivry_name = bills[y].delivry_name; g.id = bills[y].id; g.products = bills[y].products; g.total_price = bills[y].total_price; g.delivry_data = bills[y].delivry_data; l.address = C[i].address; l.phone = C[i].phone; Order_Bill j = new Order_Bill(g, l); j.Show(); } } break; } } if (exist == false) { MessageBox.Show("There is no bills for this E-mail"); } textBox8.Text = ""; }
private void button3_Click(object sender, EventArgs e) { bill g = new bill(); customer1 l = new customer1(); bool exist = false; //int x; //int y; //int z; //x=int.Parse(comboBox2.Text); //y=int.Parse(comboBox1.Text); //z=int.Parse(comboBox3.Text); for (int i = 0; i < bills.Count; i++) { if (int.Parse(comboBox2.Text) == bills[i].delivry_data.Day && int.Parse(comboBox1.Text) == bills[i].delivry_data.Month && int.Parse(comboBox3.Text) == bills[i].delivry_data.Year) { exist = true; for (int p = 0; p < C.Count; p++) { if (g.customer_email == C[p].email) { g.customer_email = C[p].email; g.delivry_name = bills[i].delivry_name; g.id = bills[i].id; g.products = bills[i].products; g.total_price = bills[i].total_price; g.delivry_data = bills[i].delivry_data; l.address = C[p].address; l.phone = C[p].phone; Order_Bill j = new Order_Bill(g, l); j.Show(); } } } } if (exist == false) { MessageBox.Show("No Bills with that Date"); } }
public Order_Bill(bill x, customer1 g) { v = g; z = x; InitializeComponent(); }
public Customer_options(customer1 H) { curraccount = H; InitializeComponent(); }