private void btnRetest_Click(object sender, EventArgs e)
        {
            this.Valveid     = ManualNumberInput.id;
            id               = this.Valveid;
            this.SendCompany = ManualNumberInput.company;
            company          = this.SendCompany;
            this.MenjiaType  = ManualNumberInput.menjiaType;
            menjiaType       = this.MenjiaType;
            this.ValveType   = ManualNumberInput.valveType;
            valveType        = this.ValveType;
            string sql = "select * from tbProductId where Id=" + "'" + id + "'";

            if (!OperateDb.IsTableNull(sql))//说明存在此id的记录,biao,须建立新名字。

            {
                DataTable dt = OperateDb.readTableN(sql);

                n = dt.Rows.Count;
                n = n + 1;
                MessageBox.Show("第" + n.ToString() + "次测试开始。");
            }
            try
            {
                RecreateRecordManager.AddNewId(id, n, company, menjiaType, valveType);
            }
            catch (Exception ex)
            {
                MessageBox.Show("加入阀编号表错误" + ex.Message);
            }
            this.Close();

            ManualExperimentWin win = ManualExperimentWin.getInstance();

            win.Show();
        }
        private void btnStartTest_Click(object sender, EventArgs e)
        {
            select();
            ManualExperimentWin win = ManualExperimentWin.getInstance();

            win.Show();
            this.Close();
        }
        /// <summary>
        /// 输入编号,发往厂家,插入到表tbProductId
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnConfirm_Click(object sender, EventArgs e)
        {
            if (txtCompany.Text == "" || txtValveId.Text == "")
            {
                MessageBox.Show("请输入,不能为空");
            }
            else
            {
                this.valveid     = txtValveId.Text;
                id               = this.valveid;
                this.SendCompany = txtCompany.Text;
                company          = this.SendCompany;


                string sqlstr = "select * from tbProductId where Id=" + "'" + txtValveId.Text + "'";


                if (!OperateDb.IsTableNull(sqlstr))//说明存在此id的记录,biao,须建立新名字。

                {
                    DataTable dt = OperateDb.readTableN(sqlstr);

                    n = dt.Rows.Count;
                    MessageBox.Show("此编号已测" + n.ToString() + "次");
                    //   i = int.Parse(dt.Rows[n-1][1].ToString());
                    n = n + 1;
                    MessageBox.Show("这是第" + n.ToString() + "测试。");
                }
                //n = i;

                try
                {
                    RecreateRecordManager.AddNewId(id, n, company);
                }
                catch (Exception ex)
                {
                    MessageBox.Show("加入阀编号表错误" + ex.Message);
                }



                this.Close();

                ManualExperimentWin win = ManualExperimentWin.getInstance();
                win.Show();
            }
        }