private void updateBichao_Load(object sender, EventArgs e) { grjdDao grjddao = new grjdDao(); dttv = grjddao.checkThresholdValues("", ""); isfrist = true; this.textBox1.Text = name; this.textBox3.Text = time; this.textBox9.Text = aichive_no; this.textBox4.Text = id_number; this.textBox2.Text = bar_code; DataTable dtbichao = tjdao.selectSgtzInfo(aichive_no, bar_code); if (dtbichao != null && dtbichao.Rows.Count > 0) { #region 身高 string height = dtbichao.Rows[0]["Height"].ToString(); if (height != "") { double heightdouble = 0; bool a = double.TryParse(height, out heightdouble); if (a == true) { int ret = GetJudgeResultForHeight(heightdouble); } } this.textBox5.Text = height; #endregion #region 重量 string weight = dtbichao.Rows[0]["Weight"].ToString(); if (weight != "") { double weightdouble = 0; bool a = double.TryParse(weight, out weightdouble); if (a == true) { int ret = GetJudgeResultForWeight(weightdouble); } } this.textBox6.Text = weight; #endregion #region BMI string _bmi = dtbichao.Rows[0]["BMI"].ToString(); if (_bmi != "") { double _dbBmi = 0; bool a = double.TryParse(_bmi, out _dbBmi); if (a == true) { int ret = GetJudgeResultForBMI(_dbBmi); } } this.textBox7.Text = _bmi; #endregion } else { MessageBox.Show("未查询到数据!"); } isfrist = false; }