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.selectXuechangguiInfo(aichive_no, bar_code);

            _isHaveData = false;
            if (dtbichao != null && dtbichao.Rows.Count > 0)
            {
                _isHaveData   = true;
                _currentdevno = "XCG_YNH_001";
                if (dtbichao.Rows[0]["deviceModel"] != null)
                {
                    _currentdevno = dtbichao.Rows[0]["deviceModel"].ToString();
                    if (_currentdevno == "")
                    {
                        _currentdevno = "XCG_YNH_001";
                    }
                }
                grjdDao grjddao = new grjdDao();
                dttv = grjddao.checkThresholdValues(_currentdevno, "血常规");


                string wbc = dtbichao.Rows[0]["WBC"].ToString();
                if (wbc != "" && wbc != "*")
                {
                    double wbcdouble = 0;
                    bool   a         = double.TryParse(wbc, out wbcdouble);
                    if (a == true)
                    {
                        GetJudgeResultForWBC(wbcdouble);
                    }
                }
                this.textBox5.Text = wbc;

                string rbc = dtbichao.Rows[0]["RBC"].ToString();
                if (rbc != "" && rbc != "*")
                {
                    double rbcdouble = 0;
                    bool   a         = double.TryParse(rbc, out rbcdouble);
                    if (a == true)
                    {
                        GetJudgeResultForRBC(rbcdouble);
                    }
                }
                this.textBox6.Text = rbc;

                string pct = dtbichao.Rows[0]["PCT"].ToString();
                if (pct != "" && pct != "*")
                {
                    double pctdouble = 0;
                    bool   a         = double.TryParse(pct, out pctdouble);
                    if (a == true)
                    {
                        GetJudgeResultForPCT(pctdouble);
                    }
                }
                this.textBox8.Text = pct;

                string plt = dtbichao.Rows[0]["PLT"].ToString();
                if (plt != "" && plt != "*")
                {
                    double pltdouble = 0;
                    bool   a         = double.TryParse(plt, out pltdouble);
                    if (a == true)
                    {
                        GetJudgeResultForPLT(pltdouble);
                    }
                }
                this.textBox7.Text = plt;

                string hgb = dtbichao.Rows[0]["HGB"].ToString();
                if (hgb != "" && hgb != "*")
                {
                    double hgbdouble = 0;
                    bool   a         = double.TryParse(hgb, out hgbdouble);
                    if (a == true)
                    {
                        GetJudgeResultForHGB(hgbdouble);
                    }
                }
                this.textBox11.Text = hgb;

                string hct = dtbichao.Rows[0]["HCT"].ToString();
                if (hct != "" && hct != "*")
                {
                    double hctdouble = 0;
                    bool   a         = double.TryParse(hct, out hctdouble);
                    if (a == true)
                    {
                        GetJudgeResultForHCT(hctdouble);
                    }
                }
                this.textBox10.Text = hct;

                string mcv = dtbichao.Rows[0]["MCV"].ToString();
                if (mcv != "" && mcv != "*")
                {
                    double mcvdouble = 0;
                    bool   a         = double.TryParse(mcv, out mcvdouble);
                    if (a == true)
                    {
                        GetJudgeResultForMCV(mcvdouble);
                    }
                }
                this.textBox13.Text = mcv;

                string mch = dtbichao.Rows[0]["MCH"].ToString();
                if (mch != "" && mch != "*")
                {
                    double mchdouble = 0;
                    bool   a         = double.TryParse(mch, out mchdouble);
                    if (a == true)
                    {
                        GetJudgeResultForMCH(mchdouble);
                    }
                }
                this.textBox12.Text = mch;

                string mchc = dtbichao.Rows[0]["MCHC"].ToString();
                if (mchc != "" && mchc != "*")
                {
                    double mchcdouble = 0;
                    bool   a          = double.TryParse(mchc, out mchcdouble);
                    if (a == true)
                    {
                        GetJudgeResultForMCHC(mchcdouble);
                    }
                }
                this.textBox15.Text = mchc;

                string rdwcv = dtbichao.Rows[0]["RDWCV"].ToString();
                if (rdwcv != "" && rdwcv != "*")
                {
                    double rdwcvdouble = 0;
                    bool   a           = double.TryParse(rdwcv, out rdwcvdouble);
                    if (a == true)
                    {
                        GetJudgeResultForRDWCV(rdwcvdouble);
                    }
                }
                this.textBox14.Text = rdwcv;

                string rdwsd = dtbichao.Rows[0]["RDWSD"].ToString();
                if (rdwsd != "" && rdwsd != "*")
                {
                    double rdwsddouble = 0;
                    bool   a           = double.TryParse(rdwsd, out rdwsddouble);
                    if (a == true)
                    {
                        GetJudgeResultForRDWSD(rdwsddouble);
                    }
                }
                this.textBox17.Text = rdwsd;

                this.textBox16.Text = dtbichao.Rows[0]["MONO"].ToString();
                this.textBox19.Text = dtbichao.Rows[0]["MONOP"].ToString();
                this.textBox18.Text = dtbichao.Rows[0]["GRAN"].ToString();
                this.textBox21.Text = dtbichao.Rows[0]["GRANP"].ToString();

                string neut = dtbichao.Rows[0]["NEUT"].ToString();
                if (neut != "" && neut != "*")
                {
                    double neutdouble = double.Parse(neut);
                    GetJudgeResultForNEUT(neutdouble);
                }
                this.textBox20.Text = neut;

                string neutp = dtbichao.Rows[0]["NEUTP"].ToString();
                if (neutp != "" && neutp != "*")
                {
                    double neutpdouble = double.Parse(neutp);
                    GetJudgeResultForNEUTP(neutpdouble);
                }
                this.textBox23.Text = neutp;

                this.textBox22.Text = dtbichao.Rows[0]["EO"].ToString();
                this.textBox25.Text = dtbichao.Rows[0]["EOP"].ToString();
                this.textBox24.Text = dtbichao.Rows[0]["BASO"].ToString();
                this.textBox29.Text = dtbichao.Rows[0]["BASOP"].ToString();

                string lym = dtbichao.Rows[0]["LYM"].ToString();
                if (lym != "" && lym != "*")
                {
                    double lymdouble = 0;
                    bool   a         = double.TryParse(lym, out lymdouble);
                    if (a == true)
                    {
                        GetJudgeResultForLYM(lymdouble);
                    }
                }
                this.textBox28.Text = lym;

                string lymp = dtbichao.Rows[0]["LYMP"].ToString();
                if (lymp != "" && lymp != "*")
                {
                    double lympdouble = 0;
                    bool   a          = double.TryParse(lymp, out lympdouble);
                    if (a == true)
                    {
                        GetJudgeResultForLYMP(lympdouble);
                    }
                }
                this.textBox31.Text = lymp;

                string mpv = dtbichao.Rows[0]["MPV"].ToString();
                if (mpv != "" && mpv != "*")
                {
                    double mpvdouble = 0;
                    bool   a         = double.TryParse(mpv, out mpvdouble);
                    if (a == true)
                    {
                        GetJudgeResultForMPV(mpvdouble);
                    }
                }
                this.textBox30.Text = mpv;

                string pdw = dtbichao.Rows[0]["PDW"].ToString();
                if (pdw != "" && pdw != "*")
                {
                    double pdwdouble = 0;
                    bool   a         = double.TryParse(pdw, out pdwdouble);
                    if (a == true)
                    {
                        GetJudgeResultForPDW(pdwdouble);
                    }
                }
                this.textBox33.Text = pdw;

                string mxd = dtbichao.Rows[0]["MXD"].ToString();
                if (mxd != "" && mxd != "*")
                {
                    double mxddouble = 0;
                    bool   a         = double.TryParse(mxd, out mxddouble);
                    if (a == true)
                    {
                        GetJudgeResultForMXD(mxddouble);
                    }
                }
                this.textBox32.Text = mxd;

                string mxdp = dtbichao.Rows[0]["MXDP"].ToString();
                if (mxdp != "" && mxdp != "*")
                {
                    double mxdpdouble = 0;
                    bool   a          = double.TryParse(mxdp, out mxdpdouble);
                    if (a == true)
                    {
                        GetJudgeResultForMXDP(mxdpdouble);
                    }
                }
                this.textBox35.Text = mxdp;
                this.textBox34.Text = dtbichao.Rows[0]["PLCR"].ToString();
                this.textBox36.Text = dtbichao.Rows[0]["OTHERS"].ToString();
            }
            else
            {
                _currentdevno = "XCG_YNH_001";
                string[] a = Common._deviceModel.Split(',');
                _currentdevno = a[1].ToString();
                grjdDao grjddao = new grjdDao();
                dttv = grjddao.checkThresholdValues(_currentdevno, "血常规");

                MessageBox.Show("未查询到数据!");
            }
        }