protected void Button3_ServerClick(object sender, EventArgs e) { TableBusiness tb = new TableBusiness(); BillBusiness bb = new BillBusiness(); TableBusiness.curentTable.Taken = false; tb.UpdateTable(TableBusiness.curentTable); BillBusiness.currentBill.Paid = true; bb.UpdateCaffeBill(BillBusiness.currentBill); BillBusiness.currentBill = null; Response.Redirect("Home.aspx"); }
private void button2_Click(object sender, EventArgs e) { TableBusiness tb = new TableBusiness(); TableBusiness.curentTable.Taken = false; tb.UpdateTable(TableBusiness.curentTable); BillBusiness bb = new BillBusiness(); BillBusiness.currentBill.Paid = true; bb.UpdateCaffeBill(BillBusiness.currentBill); this.Hide(); }
private void B_Click(object sender, EventArgs e) { BillBusiness b11 = new BillBusiness(); Button b1 = sender as Button; TableBusiness tb = new TableBusiness(); CaffeTable t = tb.getCaffeTables().Where(x => x.Table_ID == (Convert.ToInt32(b1.ID))).ToList()[0]; tb.UpdateTable(t); BillBusiness.currentBill = b11.getCaffeBills().Where(x => x.Paid == false && t.Table_ID == x.Table_ID).ToList()[0]; TableBusiness.curentTable = t; Response.Redirect("Bill.aspx"); }
private void button13_Click(object sender, EventArgs e) { BillBusiness b11 = new BillBusiness(); TableBusiness tb = new TableBusiness(); CaffeTable t = tb.getCaffeTables().Where(x => x.Table_ID == Convert.ToInt32(button13.Text)).ToList()[0]; TableBusiness.curentTable = t; t.Taken = true; tb.UpdateTable(t); try { BillBusiness.currentBill = b11.getCaffeBills().Where(x => x.Paid == false && t.Table_ID == x.Table_ID).ToList()[0]; } catch (Exception ex) { b11.InsertCaffeBill(new CaffeBill(999, t.Table_ID, 0, DateTime.Now, false)); BillBusiness.currentBill = b11.getCaffeBills().Where(x => x.Paid == false && t.Table_ID == x.Table_ID).ToList()[0]; } Bill b = new Bill(); b.Show(); }
private void B1_Click(object sender, EventArgs e) { BillBusiness b11 = new BillBusiness(); Button b1 = sender as Button; TableBusiness tb = new TableBusiness(); CaffeTable t = tb.getCaffeTables().Where(x => x.Table_ID == (Convert.ToInt32(b1.ID) - 99)).ToList()[0]; t.Taken = true; tb.UpdateTable(t); try { BillBusiness.currentBill = b11.getCaffeBills().Where(x => x.Paid == false && t.Table_ID == x.Table_ID).ToList()[0]; } catch (Exception ex) { b11.InsertCaffeBill(new CaffeBill(999, (Convert.ToInt32(b1.ID) - 99), 0, DateTime.Now, false)); BillBusiness.currentBill = b11.getCaffeBills().Where(x => x.Paid == false && t.Table_ID == x.Table_ID).ToList()[0]; } t.Table_ID = Convert.ToInt32(b1.CommandArgument); TableBusiness.curentTable = t; Response.Redirect("Bill.aspx"); }