Ejemplo n.º 1
0
        private void button5_Click(object sender, EventArgs e)
        {
            string SBP    = this.textBox5.Text;
            string DBP    = this.textBox6.Text;
            string Pulse  = this.textBox7.Text;
            bool   istrue = tjdao.updateXueyaInfo(aichive_no, id_number, bar_code, DBP, SBP, Pulse);

            if (istrue)
            {
                string xueya = "1";
                #region 处理需要什么颜色
                int r0 = 1;
                int r1 = 1;
                int r2 = 1;
                if (SBP != "")
                {
                    double a = double.Parse(SBP);
                    r0 = GetJudgeResultForSBP(a);
                }
                if (DBP != "")
                {
                    double a = double.Parse(DBP);
                    r1 = GetJudgeResultForDBP(a);
                }
                if (Pulse != "")
                {
                    double a = double.Parse(Pulse);
                    r2 = GetJudgeResultForPulse(a);
                }
                int r = r0;
                if (r < r1)
                {
                    r = r1;
                }
                if (r < r2)
                {
                    r = r2;
                }
                xueya = r.ToString();
                #endregion
                tjdao.updateTJbgdcXueya(aichive_no, bar_code, xueya);
                string base_respiratory = (Int32.Parse(Pulse) / 4).ToString();
                tjdao.updatePEXyInfo(aichive_no, bar_code, Pulse, SBP, DBP, (Int32.Parse(SBP) - 2).ToString(), (Int32.Parse(DBP) - 3).ToString(), base_respiratory);
                testFunDelegate(r, 10, rowIndex);
                MessageBox.Show("数据保存成功!");
            }
            else
            {
                MessageBox.Show("数据保存失败!");
            }
        }