Beispiel #1
0
 private void Txt_BadCause_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Enter)
     {
         if (checkBox2.Checked == true)
         {
             Txt_BadDevice.Focus();
         }
         else
         {
             subMit();
         }
     }
 }
Beispiel #2
0
        private void ServiceRecord_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
            {
                try
                {
                    DataTable Badcuase = FrmBLL.ReleaseData.arrByteToDataTable(refWebRam.Instance.Get_BadCase(Txt_Mac.Text));
                    if (Badcuase.Rows.Count == 0)
                    {
                        //  MessageBox.Show("你输入的SN有误或者板子尚未做检测!");
                        lbl_status.Text = "你输入的Mac有误或者板子尚未做检测!";
                        return;
                    }



                    if (checkBox1.Checked == false && checkBox2.Checked == false && checkBox3.Checked == false)
                    {
                        subMit();
                        return;
                    }



                    if (checkBox3.Checked == true && checkBox2.Checked == true)
                    {
                        Txt_BadCause.Text = Badcuase.Rows[0][0].ToString();
                        Txt_BadDevice.Focus();
                        return;
                    }

                    if (checkBox1.Checked == true)
                    {
                        Txt_BadCause.Text = Badcuase.Rows[0][0].ToString();
                        subMit();
                        return;
                    }
                }
                catch (Exception ex)
                {
                    lbl_status.Text = ex.ToString();
                    // throw;
                }
            }
        }