private void addCustomerbtn_Click(object sender, EventArgs e) { queryLib query = new queryLib(); customer = query.addCustomer(fNameTxtbx.Text, lNameTxtbx.Text, Streettxtbx.Text, stateTxtbx.Text, ziptxtbx.Text, phonetxtbx.Text, emailTxtbx.Text); }
private void custSearchbtn_Click(object sender, EventArgs e) { queryLib query = new queryLib(); customer = query.GetCustomers(Lnametxtbx.Text); UpdateBinding(); }
// call to queryLib to get select query private void btnViewinventory_Click(object sender, EventArgs e) { queryLib query = new queryLib(); stock = query.GetInventory(prodNametxtbx.Text); UpdateBinding(); }
private void reduceStockbtn_Click(object sender, EventArgs e) { queryLib query = new queryLib(); query.reduceStock(prodNametxtbx.Text, (int)stockQuantnumeric.Value); upcTxtbx.Text = ""; prodNametxtbx.Text = ""; stockQuantnumeric.Value = 0; }
public SelectList queryList() { SelectList ret; List <SelectListItem> _query = new List <SelectListItem>(); queryLib qlib = new queryLib(connS); List <queries> queryList = qlib.GetAll();//.getAll().ToList(); if (queryList != null) { foreach (queries rec in queryList) { _query.Add(new SelectListItem() { Text = rec.queryName, Value = rec.queryId.ToString() }); } } ret = new SelectList(_query, "Value", "Text", null); return(ret); }