示例#1
0
        private void button5_Click(object sender, EventArgs e)
        {
            string FubuBC     = this.textBox5.Text;
            string FubuResult = this.textBox6.Text;
            string FubuDesc   = this.textBox7.Text;
            string QitaBC     = this.textBox11.Text;
            string QitaResult = this.textBox10.Text;
            string QitaDesc   = this.textBox8.Text;
            string barcode    = this.textBox2.Text;
            bool   istrue     = tjdao.updateBichaoInfo(aichive_no, bar_code, FubuBC, FubuResult, FubuDesc, QitaBC, QitaResult, QitaDesc);

            if (istrue)
            {
                if (bcJudge != "" && bcJudge.Length >= 10)
                {
                    string[] bcJudgeArray = bcJudge.Split('#');
                    if (bcJudgeArray.Length > 0)
                    {
                        bool istruebc = false;
                        for (int i = 0; i < bcJudgeArray.Length; i++)
                        {
                            if (FubuResult.IndexOf(bcJudgeArray[i]) > -1)
                            {
                                istruebc = true;
                                break;
                            }
                        }
                        if (istruebc)
                        {
                            DbHelperMySQL.ExecuteSql($"update physical_examination_record set ultrasound_abdomen='1' where aichive_no='" + aichive_no + "' and bar_code='" + barcode + "'");
                            string issqdgbc = "update zkhw_tj_bgdc set BChao='1' where aichive_no = '" + aichive_no + "' and bar_code='" + barcode + "'";
                            DbHelperMySQL.ExecuteSql(issqdgbc);
                            this.textBox6.ForeColor = Color.Black;
                            testFunDelegate(1, 5, rowIndex);
                        }
                        else
                        {
                            DbHelperMySQL.ExecuteSql($"update physical_examination_record set ultrasound_abdomen='2',ultrasound_memo='" + FubuResult + "' where aichive_no='" + aichive_no + "' and bar_code='" + barcode + "'");
                            string issqdgbc = "update zkhw_tj_bgdc set BChao='3' where aichive_no = '" + aichive_no + "' and bar_code='" + barcode + "'";
                            DbHelperMySQL.ExecuteSql(issqdgbc);
                            this.textBox6.ForeColor = Color.Red;
                            testFunDelegate(3, 5, rowIndex);
                        }
                    }
                }
                MessageBox.Show("数据保存成功!");
            }
            else
            {
                MessageBox.Show("数据保存失败!");
            }
        }