private void Populate() { cShopTools tmpTools = new cShopTools(); List <string> tmpShops = tmpTools.GetShops(); for (int i = 0; i < tmpShops.Count; i++) { listBoxShops.Items.Add(tmpShops[i]); } }
private void btnSearch_Click(object sender, EventArgs e) { cShopTools tmpShopTools = new cShopTools(); string search = ""; if (txtArea.Text != "Any") { search += "Area Like \"%" + txtArea.Text + "%\" "; } else { search += "Area Like \"%\""; } if (checkBox3Drange.Checked) { search += " AND i3DRange = \"Y\""; } if (checkBoxIndoorRange.Checked) { search += " AND IndoorRange = \"Y\""; } if (checkBoxOutdoorRange.Checked) { search += " AND OutdoorRange = \"Y\""; } if (checkBoxBowService.Checked) { search += " AND BowTuning = \"Y\""; } List <string> tmpList = tmpShopTools.FindShops(search); listBoxShops.Items.Clear(); for (int i = 0; i < tmpList.Count; i++) { listBoxShops.Items.Add(tmpList[i]); } }
private void Fill(string ShopName) { cShopTools tmpTools = new cShopTools(); cShop ShopDetails = tmpTools.GetShopDetails(ShopName); groupBoxShop.Text = ShopDetails.ShopName; txtDescription.Text = ShopDetails.Description; lblURL.Text = ShopDetails.URL; txtBrands.Text = ShopDetails.MainBrands; lblIndoorRange.Text = ShopDetails.IndoorRange; lblOutdoorRange.Text = ShopDetails.OutdoorRange; lblBowTuning.Text = ShopDetails.BowTuning; lbl3Drange.Text = ShopDetails.a3DRange; lblFletching.Text = ShopDetails.Fletching; lblSales.Text = ShopDetails.Sales; lblArea.Text = ShopDetails.Area; lblGPS.Text = ShopDetails.GPS; }