Esempio n. 1
0
        private void button2_Click(object sender, EventArgs e)
        {
            try
            {
                TestGroups = AuditDb.QueryGroupsBySerialNumber(textBox2.Text, textBox1.Text);

                UpdateButtonState();
                if (TestGroups.Count > 0)
                {
                    var s = AuditDb.QueryTestsByGroup(textBox2.Text, TestGroups[0]);
                    textBox3.Text = s;
                    return;
                }

                textBox3.Text = "No results found.";
            }
            catch (Exception ex)
            {
                string s = "Web service call failed exception: " + ex.Message;
                Log.WriteLine(LogType.Database, s);
                MessageBox.Show(s);
            }
        }
Esempio n. 2
0
        private void button2_Click(object sender, EventArgs e)
        {
            try
            {
                TestGroups = AuditDb.QueryGroupsBySerialNumber(textBox2.Text, textBox1.Text);

                // Need to limit rate webservice rate to no more than one call per second
                Thread.Sleep(1000);

                UpdateButtonState();
                if (TestGroups.Count > 0)
                {
                    var s = AuditDb.QueryTestsByGroup(textBox2.Text, TestGroups[0]);
                    textBox3.Text = s;
                    return;
                }

                textBox3.Text = "No results found.";
            }
            catch (Exception ex)
            {
                MessageBox.Show("Web service call failed: " + ex.Message);
            }
        }