Ejemplo n.º 1
0
        public bool aUelderly_selfcare_estimate(bean.elderly_selfcare_estimateBean hm, string id)
        {
            int    ret = 0;
            String sql = "";

            if (id == "")
            {
                id   = Result.GetNewId();
                sql  = @"insert into elderly_selfcare_estimate (id,name,aichive_no,id_number,sex,test_date,answer_result,total_score,judgement_result,test_doctor,create_user,create_name,create_org,create_org_name,create_time,upload_status,exam_id) values ";
                sql += @" ('" + id + "','" + hm.name + "', '" + hm.aichive_no + "', '" + hm.id_number + "', '" + hm.sex + "', '" + hm.test_date + "', '" + hm.answer_result + "', '" + hm.total_score + "', '" + hm.judgement_result + "', '" + hm.test_doctor + "','" + frmLogin.userCode + "','" + frmLogin.name + "', '" + frmLogin.organCode + "', '" + frmLogin.organName + "', '" + hm.create_time + "', '" + hm.upload_status + "','" + hm.exam_id + "')";
            }
            else
            {
                sql = @"update elderly_selfcare_estimate set test_date='" + hm.test_date + "',answer_result='" + hm.answer_result + "',total_score='" + hm.total_score + "',judgement_result='" + hm.judgement_result + "',test_doctor= '" + hm.test_doctor + "',update_user= '******',update_name= '" + frmLogin.name + "',update_time='" + hm.update_time + "',upload_status= '" + hm.upload_status + "',exam_id='" + hm.exam_id + "' where aichive_no = '" + id + "'";
            }
            ret = DbHelperMySQL.ExecuteSql(sql);

            return(ret == 0 ? false : true);
        }
Ejemplo n.º 2
0
 public bool aUelderly_selfcare_estimateForExamID(bean.elderly_selfcare_estimateBean hm, string id)
 {
     return(hPD.aUelderly_selfcare_estimateForExamID(hm, id));
 }
Ejemplo n.º 3
0
        private void button4_Click(object sender, EventArgs e)
        {
            string _stag = "1";

            bean.elderly_selfcare_estimateBean elderly_selfcare_estimateBean = new bean.elderly_selfcare_estimateBean();
            elderly_selfcare_estimateBean.sex        = sex;
            elderly_selfcare_estimateBean.name       = this.textBox1.Text.Replace(" ", "");
            elderly_selfcare_estimateBean.aichive_no = this.textBox2.Text.Replace(" ", "");
            elderly_selfcare_estimateBean.id_number  = this.textBox12.Text.Replace(" ", "");

            elderly_selfcare_estimateBean.answer_result += "," + this.numericUpDown1.Value.ToString();
            elderly_selfcare_estimateBean.answer_result += "," + this.numericUpDown2.Value.ToString();
            elderly_selfcare_estimateBean.answer_result += "," + this.numericUpDown3.Value.ToString();
            elderly_selfcare_estimateBean.answer_result += "," + this.numericUpDown4.Value.ToString();
            elderly_selfcare_estimateBean.answer_result += "," + this.numericUpDown5.Value.ToString();
            elderly_selfcare_estimateBean.answer_result  = elderly_selfcare_estimateBean.answer_result.Substring(1);
            elderly_selfcare_estimateBean.total_score    = this.numericUpDown6.Value.ToString();

            if (this.numericUpDown6.Value >= 0 && this.numericUpDown6.Value <= 3)
            {
                elderly_selfcare_estimateBean.judgement_result = "可自理";
                _stag = "1";
            }
            else if (this.numericUpDown6.Value >= 4 && this.numericUpDown6.Value <= 8)
            {
                elderly_selfcare_estimateBean.judgement_result = "轻度依赖";
                _stag = "2";
            }
            else if (this.numericUpDown6.Value >= 9 && this.numericUpDown6.Value <= 18)
            {
                elderly_selfcare_estimateBean.judgement_result = "中度依赖";
                _stag = "3";
            }
            else if (this.numericUpDown6.Value >= 19)
            {
                elderly_selfcare_estimateBean.judgement_result = "不能自理";
                _stag = "4";
            }
            else
            {
            }
            //////以下页面未用 数据库字段格式要求
            elderly_selfcare_estimateBean.upload_time   = DateTime.Now.ToString("yyyy-MM-dd");
            elderly_selfcare_estimateBean.create_time   = DateTime.Now.ToString("yyyy-MM-dd");
            elderly_selfcare_estimateBean.update_time   = DateTime.Now.ToString("yyyy-MM-dd");
            elderly_selfcare_estimateBean.upload_status = "0";
            elderly_selfcare_estimateBean.test_date     = DateTime.Now.ToString("yyyy-MM-dd");
            elderly_selfcare_estimateBean.create_name   = frmLogin.name;
            elderly_selfcare_estimateBean.test_doctor   = basicInfoSettings.zeren_doctor;
            if (_examid == "")
            {
                healthCheckupDao hcd = new healthCheckupDao();
                _examid = hcd.GetExaminationRecord(elderly_selfcare_estimateBean.aichive_no, elderly_selfcare_estimateBean.id_number, _barCode);
            }
            elderly_selfcare_estimateBean.exam_id = _examid;
            string _id = "";

            if (flag == 1)
            {
                _id = _examid;
            }
            bool isfalse = olderHelthServices.aUelderly_selfcare_estimateForExamID(elderly_selfcare_estimateBean, _id);

            //bool isfalse = olderHelthServices.aUelderly_selfcare_estimate(elderly_selfcare_estimateBean, archiveno);
            if (isfalse)
            {
                //这里就要更新对应的 zkhw_tj_bgdc-->lnrzlnlpg、physical_examination_record-->base_selfcare_estimate
                string     id_number  = textBox12.Text;
                string     aichive_no = textBox2.Text;
                tjcheckDao tjdao      = new tjcheckDao();
                //用事务更新
                tjdao.UpdateOldestimateTran("1", _barCode, id_number, _examid, _stag);
                this.DialogResult = DialogResult.OK;
            }
        }