Пример #1
0
        private void btn2_search_Click(object sender, EventArgs e)
        {
            try
            {
                //Substitution for search, hopefully i figure out how to properly search
                string searchID = textBox7_searchID.Text;
                MessageBox.Show("Item with id '" + IM.findByID(searchID).prodID + "' found. Item info: " + IM.findByID(searchID) + ".");

                string searchGenre = textBox8_searchGenre.Text;
                MessageBox.Show(IM.findByGenre(searchGenre).genre + " movie found. Item info: " + IM.findByGenre(searchGenre) + ".");

                string searchPrice = textBox9_searchPrice.Text;
                MessageBox.Show("$" + IM.findByPrice(double.Parse(searchPrice)).price + " movie found. Item info: " + IM.findByPrice(double.Parse(searchPrice)) + ".");

            }
            catch (Exception ex)
            {
                MessageBox.Show("Please make sure to fill out the text boxes with the appropriate information.");
            }
        }