Exemplo n.º 1
0
        private void updateBichao_Load(object sender, EventArgs e)
        {
            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.selectShenghuaInfo(aichive_no, bar_code);

            if (dtbichao != null && dtbichao.Rows.Count > 0)
            {
                _haveData = true;
                //这里处理下  dttv
                _currentdevno = "SH_YNH_001";
                if (dtbichao.Rows[0]["deviceModel"] != null)
                {
                    _currentdevno = dtbichao.Rows[0]["deviceModel"].ToString();
                    if (_currentdevno == "")
                    {
                        _currentdevno = "SH_YNH_001";
                    }
                }
                grjdDao grjddao = new grjdDao();
                dttv = grjddao.checkThresholdValues(_currentdevno, "生化");

                string alt = dtbichao.Rows[0]["ALT"].ToString();
                if (alt != "" && alt != "*")
                {
                    double altdouble = 0;
                    bool   a         = double.TryParse(alt, out altdouble);
                    if (a == true)
                    {
                        GetJudgeResultForALT(altdouble);
                    }
                }
                this.textBox5.Text = alt;

                string ast = dtbichao.Rows[0]["AST"].ToString();
                if (ast != "" && ast != "*")
                {
                    double astdouble = 0;
                    bool   a         = double.TryParse(ast, out astdouble);
                    if (a == true)
                    {
                        GetJudgeResultForAST(astdouble);
                    }
                }
                this.textBox6.Text = ast;

                string tbil = dtbichao.Rows[0]["TBIL"].ToString();
                if (tbil != "" && tbil != "*")
                {
                    double tbildouble = 0;
                    bool   a          = double.TryParse(tbil, out tbildouble);
                    if (a == true)
                    {
                        GetJudgeResultForTBIL(tbildouble);
                    }
                }
                this.textBox8.Text = tbil;

                string dbil = dtbichao.Rows[0]["DBIL"].ToString();
                //if (dbil != "" && dbil != "*")
                //{
                //    double dbildouble = double.Parse(dbil);
                //    GetJudgeResultForDBIL(dbildouble);
                //}
                this.textBox7.Text = dbil;

                string crea = dtbichao.Rows[0]["CREA"].ToString();
                if (crea != "" && crea != "*")
                {
                    double creadouble = 0;
                    bool   a          = double.TryParse(crea, out creadouble);
                    if (a == true)
                    {
                        GetJudgeResultForCREA(creadouble);
                    }
                }
                this.textBox11.Text = crea;
                string urea = dtbichao.Rows[0]["UREA"].ToString();
                if (urea != "" && urea != "*")
                {
                    double ureadouble = 0;
                    bool   a          = double.TryParse(urea, out ureadouble);
                    if (a == true)
                    {
                        GetJudgeResultForUREA(ureadouble);
                    }
                }
                this.textBox10.Text = urea;

                string glu = dtbichao.Rows[0]["GLU"].ToString();
                if (glu != "" && glu != "*")
                {
                    double gludouble = 0;
                    bool   a         = double.TryParse(glu, out gludouble);
                    if (a == true)
                    {
                        GetJudgeResultForGLU(gludouble);
                    }
                }
                this.textBox13.Text = glu;

                string tg = dtbichao.Rows[0]["TG"].ToString();
                if (tg != "" && tg != "*")
                {
                    double tgdouble = 0;
                    bool   a        = double.TryParse(tg, out tgdouble);
                    if (a == true)
                    {
                        GetJudgeResultForTG(tgdouble);
                    }
                }
                this.textBox12.Text = tg;

                string cho = dtbichao.Rows[0]["CHO"].ToString();
                if (cho != "" && cho != "*")
                {
                    double chodouble = 0;
                    bool   a         = double.TryParse(cho, out chodouble);
                    if (a == true)
                    {
                        GetJudgeResultForCHO(chodouble);
                    }
                }
                this.textBox15.Text = cho;

                string hdlc = dtbichao.Rows[0]["HDLC"].ToString();
                if (hdlc != "" && hdlc != "*")
                {
                    double hdlcdouble = 0;
                    bool   a          = double.TryParse(hdlc, out hdlcdouble);
                    if (a == true)
                    {
                        GetJudgeResultForHDLC(hdlcdouble);
                    }
                }
                this.textBox14.Text = hdlc;

                string ldlc = dtbichao.Rows[0]["LDLC"].ToString();
                if (ldlc != "" && ldlc != "*")
                {
                    double ldlcdouble = 0;
                    bool   a          = double.TryParse(ldlc, out ldlcdouble);
                    if (a == true)
                    {
                        GetJudgeResultForLDLC(ldlcdouble);
                    }
                }
                this.textBox17.Text = ldlc;

                this.textBox16.Text = dtbichao.Rows[0]["ALB"].ToString();
                this.textBox19.Text = dtbichao.Rows[0]["UA"].ToString();
                this.textBox18.Text = dtbichao.Rows[0]["HCY"].ToString();
                this.textBox21.Text = dtbichao.Rows[0]["AFP"].ToString();
                this.textBox20.Text = dtbichao.Rows[0]["CEA"].ToString();
                this.textBox23.Text = dtbichao.Rows[0]["Ka"].ToString();
                this.textBox22.Text = dtbichao.Rows[0]["Na"].ToString();
                this.textBox25.Text = dtbichao.Rows[0]["TP"].ToString();
                this.textBox24.Text = dtbichao.Rows[0]["ALP"].ToString();
                this.textBox27.Text = dtbichao.Rows[0]["GGT"].ToString();
                this.textBox26.Text = dtbichao.Rows[0]["CHE"].ToString();
                this.textBox29.Text = dtbichao.Rows[0]["TBA"].ToString();
                this.textBox28.Text = dtbichao.Rows[0]["APOA1"].ToString();
                this.textBox31.Text = dtbichao.Rows[0]["APOB"].ToString();
                this.textBox30.Text = dtbichao.Rows[0]["CK"].ToString();
                this.textBox33.Text = dtbichao.Rows[0]["CKMB"].ToString();
                this.textBox32.Text = dtbichao.Rows[0]["LDHL"].ToString();
                this.textBox35.Text = dtbichao.Rows[0]["HBDH"].ToString();
                this.textBox34.Text = dtbichao.Rows[0]["aAMY"].ToString();
            }
            else
            {
                _currentdevno = "SH_YNH_001";
                string[] a = Common._deviceModel.Split(',');
                _currentdevno = a[0].ToString();
                grjdDao grjddao = new grjdDao();
                dttv = grjddao.checkThresholdValues(_currentdevno, "生化");
                MessageBox.Show("未查询到数据!");
            }
        }