示例#1
0
        private void updateBichao_Load(object sender, EventArgs e)
        {
            grjdDao grjddao = new grjdDao();

            dttv = grjddao.checkThresholdValues("", "");

            this.textBox1.Text = name;
            this.textBox3.Text = time;
            this.textBox9.Text = aichive_no;
            this.textBox4.Text = id_number;
            this.textBox2.Text = bar_code;
            _isHaveData        = false;
            DataTable dtbichao = tjdao.selectNiaochangguiInfo(aichive_no, bar_code);

            if (dtbichao != null && dtbichao.Rows.Count > 0)
            {
                _isHaveData = true;
                string wbc     = dtbichao.Rows[0]["WBC"].ToString();
                int    _result = GetJudgeResultForWBC(wbc);
                this.textBox5.Text = wbc;

                this.textBox6.Text = dtbichao.Rows[0]["LEU"].ToString();

                string nit = dtbichao.Rows[0]["NIT"].ToString();
                _result            = GetJudgeResultForNIT(nit);
                this.textBox8.Text = nit;

                string uro = dtbichao.Rows[0]["URO"].ToString();
                _result            = GetJudgeResultForURO(uro);
                this.textBox7.Text = uro;

                string pro = dtbichao.Rows[0]["PRO"].ToString();
                _result             = GetJudgeResultForPRO(pro);
                this.textBox11.Text = pro;

                string ph = dtbichao.Rows[0]["PH"].ToString();
                if (ph != "")
                {
                    double phdouble = 0;
                    bool   a        = double.TryParse(ph, out phdouble);
                    if (a == true)
                    {
                        _result = GetJudgeResultForPH(phdouble);
                    }
                }
                this.textBox10.Text = ph;

                string bld = dtbichao.Rows[0]["BLD"].ToString();
                _result             = GetJudgeResultForBLD(bld);
                this.textBox13.Text = bld;

                string sg = dtbichao.Rows[0]["SG"].ToString();
                if (sg != "")
                {
                    double sgdouble = 0;
                    bool   a        = double.TryParse(sg, out sgdouble);
                    if (a == true)
                    {
                        GetJudgeResultForSG(sgdouble);
                    }
                }
                this.textBox12.Text = sg;

                string ket = dtbichao.Rows[0]["KET"].ToString();
                GetJudgeResultForKET(ket);
                this.textBox15.Text = ket;

                string bil = dtbichao.Rows[0]["BIL"].ToString();
                GetJudgeResultForBIL(bil);
                this.textBox14.Text = bil;

                string glu = dtbichao.Rows[0]["GLU"].ToString();
                GetJudgeResultForGLU(glu);
                this.textBox17.Text = glu;

                string vc = dtbichao.Rows[0]["Vc"].ToString();
                GetJudgeResultForVC(vc);
                this.textBox16.Text = dtbichao.Rows[0]["Vc"].ToString();

                string strma = dtbichao.Rows[0]["MA"].ToString();
                if (strma != "")
                {
                    double madouble = 0;
                    bool   a        = double.TryParse(strma, out madouble);
                    if (a == true)
                    {
                        GetJudgeResultForMA(madouble);
                    }
                }
                this.textBox19.Text = dtbichao.Rows[0]["MA"].ToString();

                this.textBox18.Text = dtbichao.Rows[0]["ACR"].ToString();
                this.textBox21.Text = dtbichao.Rows[0]["Ca"].ToString();
                this.textBox20.Text = dtbichao.Rows[0]["CR"].ToString();
            }
            else
            {
                MessageBox.Show("未查询到数据!");
            }
        }