Exemple #1
0
        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);
        }
Exemple #2
0
        private void custSearchbtn_Click(object sender, EventArgs e)
        {
            queryLib query = new queryLib();

            customer = query.GetCustomers(Lnametxtbx.Text);
            UpdateBinding();
        }
Exemple #3
0
        // 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();
        }
Exemple #4
0
        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;
        }
Exemple #5
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);
        }