Example #1
0
        private void PartEntered(String sPart)
        {
            Part             = sPart;
            uxEnterPart.Text = "Clear";
            uxPart.Text      = Part;
            uxPart.Enabled   = false;
            //Check to see if part is a PCB Part
            var connection1 = new SqlConnection(connectionString1);

            connection1.Open();
            //SqlCommand command1 = new SqlCommand("Select default_po_number from part_online where part = '" + uxPart.Text + "'", connection1);
            var command1 =
                new SqlCommand("Select count(*) from part where product_line='pcb' and part = '" + uxPart.Text + "'",
                               connection1);
            //select * from part where product_line='pcb'
            var PartCount = (int)command1.ExecuteScalar();

            connection1.Close();
            if (PartCount > 0)
            {
                MyRFGun.PCBNotification(); //PCL 4-9-2012
            }
        }