Пример #1
0
        private void button5_Click(object sender, EventArgs e)
        {
            string ALT   = this.textBox5.Text;
            string AST   = this.textBox6.Text;
            string TBIL  = this.textBox8.Text;
            string DBIL  = this.textBox7.Text;
            string CREA  = this.textBox11.Text;
            string UREA  = this.textBox10.Text;
            string GLU   = this.textBox13.Text;
            string TG    = this.textBox12.Text;
            string CHO   = this.textBox15.Text;
            string HDLC  = this.textBox14.Text;
            string LDLC  = this.textBox17.Text;
            string ALB   = this.textBox16.Text;
            string UA    = this.textBox19.Text;
            string HCY   = this.textBox18.Text;
            string AFP   = this.textBox21.Text;
            string CEA   = this.textBox20.Text;
            string Ka    = this.textBox23.Text;
            string Na    = this.textBox22.Text;
            string TP    = this.textBox25.Text;
            string ALP   = this.textBox24.Text;
            string GGT   = this.textBox27.Text;
            string CHE   = this.textBox26.Text;
            string TBA   = this.textBox29.Text;
            string APOA1 = this.textBox28.Text;
            string APOB  = this.textBox31.Text;
            string CK    = this.textBox30.Text;
            string CKMB  = this.textBox33.Text;
            string LDHL  = this.textBox32.Text;
            string HBDH  = this.textBox35.Text;
            string aAMY  = this.textBox34.Text;
            string shren = setting.basicInfoSettings.sh;

            if (_haveData == false)
            {
                string[] deviceno = Common._deviceModel.Split(',');
                _currentdevno = deviceno[0].ToString().Trim();
                if (_currentdevno == "")
                {
                    _currentdevno = "SH_YNH_001";
                }
            }
            bool istrue = tjdao.updateShenghuaInfo(aichive_no, id_number, bar_code, ALT, AST, TBIL, DBIL, CREA, UREA, GLU, TG, CHO, HDLC, LDLC, ALB, UA, HCY, AFP, CEA, Ka, Na, TP, ALP, GGT, CHE, TBA, APOA1, APOB, CK, CKMB, LDHL, HBDH, aAMY, shren, _currentdevno);

            if (istrue)
            {
                #region 判断
                int r  = 1;
                int r0 = 1;
                if (ALT != "" && ALT != "*")
                {
                    double b = 0;
                    bool   a = double.TryParse(ALT, out b);
                    if (a == true)
                    {
                        r0 = GetJudgeResultForALT(b);
                    }
                }
                int r1 = 1;
                if (AST != "" && AST != "*")
                {
                    double b = 0;
                    bool   a = double.TryParse(AST, out b);
                    if (a == true)
                    {
                        r1 = GetJudgeResultForAST(b);
                    }
                }

                int r2 = 1;
                if (TBIL != "" && TBIL != "*")
                {
                    double b = 0;
                    bool   a = double.TryParse(TBIL, out b);
                    if (a == true)
                    {
                        r2 = GetJudgeResultForTBIL(b);
                    }
                }

                int r3 = 1;
                //if (DBIL != "" && DBIL != "*")
                //{
                //    r3 = GetJudgeResultForDBIL(double.Parse(DBIL));
                //}

                int r4 = 1;
                if (CREA != "" && CREA != "*")
                {
                    double b = 0;
                    bool   a = double.TryParse(CREA, out b);
                    if (a == true)
                    {
                        r4 = GetJudgeResultForCREA(b);
                    }
                }

                int r5 = 1;
                if (UREA != "" && UREA != "*")
                {
                    double b = 0;
                    bool   a = double.TryParse(UREA, out b);
                    if (a == true)
                    {
                        r5 = GetJudgeResultForUREA(b);
                    }
                }
                int r6 = 1;
                if (GLU != "" && GLU != "*")
                {
                    double b = 0;
                    bool   a = double.TryParse(GLU, out b);
                    if (a == true)
                    {
                        r6 = GetJudgeResultForGLU(b);
                    }
                }

                int r7 = 1;
                if (TG != "" && TG != "*")
                {
                    double b = 0;
                    bool   a = double.TryParse(TG, out b);
                    if (a == true)
                    {
                        r7 = GetJudgeResultForTG(b);
                    }
                }
                int r8 = 1;
                if (CHO != "" && CHO != "*")
                {
                    double b = 0;
                    bool   a = double.TryParse(CHO, out b);
                    if (a == true)
                    {
                        r8 = GetJudgeResultForCHO(b);
                    }
                }
                int r9 = 1;
                if (HDLC != "" && HDLC != "*")
                {
                    double b = 0;
                    bool   a = double.TryParse(HDLC, out b);
                    if (a == true)
                    {
                        r9 = GetJudgeResultForHDLC(b);
                    }
                }
                int r10 = 1;
                if (LDLC != "" && LDLC != "*")
                {
                    double b = 0;
                    bool   a = double.TryParse(LDLC, out b);
                    if (a == true)
                    {
                        r10 = GetJudgeResultForLDLC(b);
                    }
                }

                r = r0;
                if (r < r1)
                {
                    r = r1;
                }
                if (r < r2)
                {
                    r = r2;
                }
                if (r < r3)
                {
                    r = r3;
                }
                if (r < r4)
                {
                    r = r4;
                }
                if (r < r5)
                {
                    r = r5;
                }
                if (r < r6)
                {
                    r = r6;
                }
                if (r < r7)
                {
                    r = r7;
                }
                if (r < r8)
                {
                    r = r8;
                }
                if (r < r9)
                {
                    r = r9;
                }
                if (r < r10)
                {
                    r = r10;
                }
                #endregion
                tjdao.updateTJbgdcShenghua(aichive_no, bar_code, r);
                tjdao.updatePEShInfo(aichive_no, bar_code, CHO, TG, LDLC, HDLC, GLU, ALT, AST, ALB, TBIL, DBIL, CREA, UREA);
                testFunDelegate(r, 7, rowIndex);
                MessageBox.Show("数据保存成功!");
            }
            else
            {
                MessageBox.Show("数据保存失败!");
            }
        }