private void FillPage() { ArrayList chocolateList = new ArrayList(); chocolateList = ConnectionClass.GetChocolateByType("name", "%%"); OutputFunctions.listItems(chocolateList, pnlProducts); }
private void printOrders(string begindate, string endDate, bool shipped) { StringBuilder sb = OutputFunctions.GenerateOrders(begindate, endDate, shipped); if (shipped == false) { lblOpenOrders.Text = sb.ToString(); } else { lblClosedOrders.Text = sb.ToString(); } }
public void btn_Remove(object sender, EventArgs e) { Button button = sender as Button; OutputFunctions.removeBasketItem(button); GenerateControls(); List <Tuple <int, int> > basketItems = (List <Tuple <int, int> >)Session["ordersIds"]; if (basketItems.Count() == 0) { btnOrder.Visible = false; lblResult.Visible = false; txtAddress.Visible = false; lblError.Text = "Your basket is empty!"; } }
protected void btnSearch_Click(object sender, EventArgs e) { ArrayList chocolateList = new ArrayList(); string what = txtSearch.Text; what = what.Replace("'", ""); what = what.Replace("\"", ""); chocolateList = ConnectionClass.ChocolateSearch(what); pnlProducts.Controls.Clear(); OutputFunctions.listItems(chocolateList, pnlProducts); if (pnlProducts.Controls.Count == 0) { Label lbl = new Label() { Text = "No data found!", ForeColor = System.Drawing.ColorTranslator.FromHtml("#34000D") }; pnlProducts.Controls.Add(lbl); } }
private void FillPage() { ArrayList chocolateList = new ArrayList(); if (!IsPostBack) { chocolateList = ConnectionClass.GetChocolateByType("type", "seasonal"); } else { string type = "holiday"; string what = DropDownList1.SelectedValue; if (what.Equals("All")) { what = "seasonal"; type = "type"; } ; chocolateList = ConnectionClass.GetChocolateByType(type, what); } OutputFunctions.listItems(chocolateList, pnlProducts); }