Beispiel #1
0
        static void m7(string param)
        {
            var    custquery = db.CustOrderHist(param);
            string msg       = "";

            foreach (CustOrderHistResult custOrdHist in custquery)
            {
                msg = msg + custOrdHist.ProductName + "\n";
            }

            Console.WriteLine(msg);
        }
Beispiel #2
0
        private void button2_Click(object sender, EventArgs e)
        {
            string param     = textBox2.Text;
            var    custquery = db.CustOrderHist(param);
            string msg       = "";

            foreach (CustOrderHistResult custOrdHist in custquery)
            {
                msg = msg + custOrdHist.ProductName + "\n";
            }
            MessageBox.Show(msg);
            param         = "";
            textBox2.Text = "";
        }
Beispiel #3
0
        private void button2_Click(object sender, EventArgs e)
        {
            // <Snippet3>
            // Comments in the code for button2 are the same
            // as for button1.
            string param = textBox2.Text;

            var custquery = db.CustOrderHist(param);

            string msg = "";

            foreach (CustOrderHistResult custOrdHist in custquery)
            {
                msg = msg + custOrdHist.ProductName + "\n";
            }
            MessageBox.Show(msg);

            param         = "";
            textBox2.Text = "";
            // </Snippet3>
        }