Exemple #1
0
        //诊断
        //诊断保存
        private void button_zdsave_Click(object sender, EventArgs e)
        {
            DAL DB = new DAL();

            DB.ConnDB();

            Register.Register re = new Register.Register();
            //re.mz = textBox_mz_zd.Text;
            re.zlk       = textBox_zlk_zd.Text;
            re.name      = textBox_name_zd.Text;
            re.age       = textBox_age_zd.Text;
            re.sex       = textBox_sex_zd.Text;
            re.zds       = comboBox_zds.Text;
            re.zdresult  = comboBox_zdresult.Text;
            re.zdid      = textBox_zdid.Text;
            re.fbdate    = dateTimePicker_fb.Text;
            re.zddate    = DateTime.Now.ToString();
            re.zdmain    = checkBox_mainzd.CheckState.ToString();
            re.zdft      = checkBox_ft.CheckState.ToString();
            re.zdconfirm = checkBox_confirm.CheckState.ToString();
            DB.insertZD(re);

            this.dataGridView_jz.DataMember = "";
            DB.GridviewZD(re.zlk);
            this.dataGridView_jz.DataSource = DB.dataset;
            this.dataGridView_jz.DataMember = "zd";

            DB.TC();

            MessageBox.Show("保存成功!");
            DB.delect(re.mz);

            DB.myconn.Close();
        }
Exemple #2
0
        //EMR保存
        private void button_save_e_Click_1(object sender, EventArgs e)
        {
            DAL DB = new DAL();

            DB.ConnDB();

            Register.Register re = new Register.Register();
            re.zlk  = textBox_zlk_e.Text;
            re.mz   = textBox_mz_e.Text;
            re.name = textBox_name_e.Text;
            re.age  = textBox_age_e.Text;
            re.sr   = textBox_sr_e.Text;
            re.cid  = textBox_cid_e.Text;
            re.nat  = textBox_nat_e.Text;
            re.dep  = textBox_dep_e.Text;
            re.doc  = textBox_doc_e.Text;
            re.chas = textBox_chas_e.Text;
            re.zs   = richTextBox_zs.Text;
            re.xbs  = richTextBox_xbs.Text;
            re.jws  = richTextBox_jws.Text;

            DB.insertERM(re);

            DB.TC();

            MessageBox.Show("保存成功!");

            DB.myconn.Close();
        }
Exemple #3
0
        //诊断读取
        private void button_zdread_Click(object sender, EventArgs e)
        {
            Register.Register re = new Register.Register();
            re.zlk = textBox_zlk_zd.Text;

            DAL BD = new DAL();

            BD.ConnDB();

            BD.showZD(re.zlk, "zlk");
            if (BD.mycmd.ExecuteScalar() != null)
            {
                textBox_zlk_zd.Text     = BD.mycmd.ExecuteScalar().ToString();
                textBox_zlk_zd.ReadOnly = true;
            }
            else
            {
                MessageBox.Show("查无此病患,请重新输入");
            }

            BD.showZD(re.zlk, "name");
            if (BD.mycmd.ExecuteScalar() != null)
            {
                textBox_name_zd.Text     = BD.mycmd.ExecuteScalar().ToString();
                textBox_name_zd.ReadOnly = true;
            }

            BD.showZD(re.zlk, "age");
            if (BD.mycmd.ExecuteScalar() != null)
            {
                textBox_age_zd.Text     = BD.mycmd.ExecuteScalar().ToString();
                textBox_age_zd.ReadOnly = true;
            }

            BD.showZD(re.zlk, "sex");
            if (BD.mycmd.ExecuteScalar() != null)
            {
                textBox_sex_zd.Text     = BD.mycmd.ExecuteScalar().ToString();
                textBox_sex_zd.ReadOnly = true;
            }
            BD.showZD(re.zlk, "zddate");
            if (BD.mycmd.ExecuteScalar() != null)
            {
                textBox_zddate.Text     = BD.mycmd.ExecuteScalar().ToString();
                textBox_zddate.ReadOnly = true;
            }

            this.dataGridView_jz.DataMember = "";
            BD.GridviewZD(re.zlk);
            this.dataGridView_zd.DataSource = BD.dataset;
            this.dataGridView_zd.DataMember = "zd";

            //error
            BD.TC();
            BD.myconn.Close();
            MessageBox.Show("更新成功!");
        }
Exemple #4
0
 private void dataGridView_zd_CellContentClick(object sender, DataGridViewCellEventArgs e)
 {
     Register.Register re = new Register.Register();
     comboBox_zdresult.Text = this.dataGridView_jz.CurrentRow.Cells[1].Value.ToString();
     comboBox_zds.Text      = this.dataGridView_jz.CurrentRow.Cells[0].Value.ToString();
     textBox_zdid.Text      = this.dataGridView_jz.CurrentRow.Cells[2].Value.ToString();
     dateTimePicker_fb.Text = this.dataGridView_jz.CurrentRow.Cells[3].Value.ToString();
     if (this.dataGridView_jz.CurrentRow.Cells[4].Value.ToString() == "Checked")
     {
         checkBox_confirm.CheckState = CheckState.Checked;
     }
     if (this.dataGridView_jz.CurrentRow.Cells[5].Value.ToString() == "Checked")
     {
         checkBox_mainzd.CheckState = CheckState.Checked;
     }
     if (this.dataGridView_jz.CurrentRow.Cells[6].Value.ToString() == "Checked")
     {
         checkBox_ft.CheckState = CheckState.Checked;
     }
 }
Exemple #5
0
        //EMR读取
        private void button_read_e_Click(object sender, EventArgs e)
        {
            Register.Register re = new Register.Register();
            re.mz = textBox_mz_e.Text;


            DAL BD = new DAL();

            BD.ConnDB();


            BD.showEMR(re.mz, "mz");
            if (BD.mycmd.ExecuteScalar() != null)
            {
                textBox_mz_e.Text     = BD.mycmd.ExecuteScalar().ToString();
                textBox_mz_e.ReadOnly = true;
            }
            else
            {
                MessageBox.Show("查无此病历,请重新输入");
            }

            BD.showEMR(re.mz, "zlk");
            if (BD.mycmd.ExecuteScalar() != null)
            {
                textBox_zlk_e.Text     = BD.mycmd.ExecuteScalar().ToString();
                textBox_zlk_e.ReadOnly = true;
            }

            BD.showEMR(re.mz, "name");
            if (BD.mycmd.ExecuteScalar() != null)
            {
                textBox_name_e.Text     = BD.mycmd.ExecuteScalar().ToString();
                textBox_name_e.ReadOnly = true;
            }

            BD.showEMR(re.mz, "age");
            if (BD.mycmd.ExecuteScalar() != null)
            {
                textBox_age_e.Text     = BD.mycmd.ExecuteScalar().ToString();
                textBox_age_e.ReadOnly = true;
            }

            BD.showEMR(re.mz, "sr");
            if (BD.mycmd.ExecuteScalar() != null)
            {
                textBox_sr_e.Text     = BD.mycmd.ExecuteScalar().ToString();
                textBox_sr_e.ReadOnly = true;
            }

            BD.showEMR(re.mz, "cid");
            if (BD.mycmd.ExecuteScalar() != null)
            {
                textBox_cid_e.Text     = BD.mycmd.ExecuteScalar().ToString();
                textBox_cid_e.ReadOnly = true;
            }

            BD.showEMR(re.mz, "sex");
            if (BD.mycmd.ExecuteScalar() != null)
            {
                textBox_sex_e.Text     = BD.mycmd.ExecuteScalar().ToString();
                textBox_sex_e.ReadOnly = true;
            }

            BD.showEMR(re.mz, "nat");
            if (BD.mycmd.ExecuteScalar() != null)
            {
                textBox_nat_e.Text     = BD.mycmd.ExecuteScalar().ToString();
                textBox_nat_e.ReadOnly = true;
            }

            BD.showEMR(re.mz, "dep");
            if (BD.mycmd.ExecuteScalar() != null)
            {
                textBox_dep_e.Text     = BD.mycmd.ExecuteScalar().ToString();
                textBox_dep_e.ReadOnly = true;
            }

            BD.showEMR(re.mz, "doc");
            if (BD.mycmd.ExecuteScalar() != null)
            {
                textBox_doc_e.Text     = BD.mycmd.ExecuteScalar().ToString();
                textBox_doc_e.ReadOnly = true;
            }

            BD.showEMR(re.mz, "chas");
            if (BD.mycmd.ExecuteScalar() != null)
            {
                textBox_chas_e.Text     = BD.mycmd.ExecuteScalar().ToString();
                textBox_chas_e.ReadOnly = true;
            }

            BD.showEMR(re.mz, "xbs");
            if (BD.mycmd.ExecuteScalar() != null)
            {
                richTextBox_xbs.Text     = BD.mycmd.ExecuteScalar().ToString();
                richTextBox_xbs.ReadOnly = true;
            }

            BD.showEMR(re.mz, "zs");
            if (BD.mycmd.ExecuteScalar() != null)
            {
                richTextBox_zs.Text     = BD.mycmd.ExecuteScalar().ToString();
                richTextBox_zs.ReadOnly = true;
            }

            BD.showEMR(re.mz, "jws");
            if (BD.mycmd.ExecuteScalar() != null)
            {
                richTextBox_jws.Text     = BD.mycmd.ExecuteScalar().ToString();
                richTextBox_jws.ReadOnly = true;
            }
        }
Exemple #6
0
        //候诊接诊
        private void button_jz_Click_1(object sender, EventArgs e)
        {
            Register.Register re = new Register.Register();
            try
            {
                re.mz             = this.dataGridView_jz.CurrentRow.Cells[0].Value.ToString();
                textBox_mz_e.Text = re.mz;

                //textBox_mz_zd.Text = re.mz;

                DAL BD = new DAL();
                BD.ConnDB();

                BD.show(re.mz, "zlk");
                if (BD.mycmd.ExecuteScalar() != null)
                {
                    textBox_zlk_zd.Text = BD.mycmd.ExecuteScalar().ToString();
                    textBox_zlk_e.Text  = BD.mycmd.ExecuteScalar().ToString();
                }

                else
                {
                    MessageBox.Show("查无此号,请重新接诊");
                }
                //诊断日期
                textBox_zddate.Text = DateTime.Now.ToLocalTime().ToString();

                BD.show(re.mz, "name");
                if (BD.mycmd.ExecuteScalar() != null)
                {
                    textBox_name_e.Text  = BD.mycmd.ExecuteScalar().ToString();
                    textBox_name_zd.Text = BD.mycmd.ExecuteScalar().ToString();
                }

                BD.show(re.mz, "age");
                if (BD.mycmd.ExecuteScalar() != null)
                {
                    textBox_age_zd.Text = BD.mycmd.ExecuteScalar().ToString();
                    textBox_age_e.Text  = BD.mycmd.ExecuteScalar().ToString();
                }

                BD.show(re.mz, "sr");
                if (BD.mycmd.ExecuteScalar() != null)
                {
                    textBox_zddate.Text = BD.mycmd.ExecuteScalar().ToString();
                    textBox_sr_e.Text   = BD.mycmd.ExecuteScalar().ToString();
                }

                BD.show(re.mz, "cid");
                if (BD.mycmd.ExecuteScalar() != null)
                {
                    //textBox_cid_zd.Text = BD.mycmd.ExecuteScalar().ToString();
                    textBox_cid_e.Text = BD.mycmd.ExecuteScalar().ToString();
                }

                BD.show(re.mz, "sex");
                if (BD.mycmd.ExecuteScalar() != null)
                {
                    textBox_sex_zd.Text = BD.mycmd.ExecuteScalar().ToString();
                    textBox_sex_e.Text  = BD.mycmd.ExecuteScalar().ToString();
                }

                BD.show(re.mz, "nat");
                if (BD.mycmd.ExecuteScalar() != null)
                {
                    //textBox_nation_zd.Text = BD.mycmd.ExecuteScalar().ToString();
                    textBox_nat_e.Text = BD.mycmd.ExecuteScalar().ToString();
                }

                BD.show(re.mz, "dep");
                if (BD.mycmd.ExecuteScalar() != null)
                {
                    //textBox_dp_zd.Text = BD.mycmd.ExecuteScalar().ToString();
                    textBox_dep_e.Text = BD.mycmd.ExecuteScalar().ToString();
                }

                BD.show(re.mz, "doc");
                if (BD.mycmd.ExecuteScalar() != null)
                {
                    //textBox_doc_zd.Text = BD.mycmd.ExecuteScalar().ToString();
                    textBox_doc_e.Text = BD.mycmd.ExecuteScalar().ToString();
                }

                BD.show(re.mz, "chas");
                if (BD.mycmd.ExecuteScalar() != null)
                {
                    //textBox_chas_zd.Text = BD.mycmd.ExecuteScalar().ToString();
                    textBox_chas_e.Text = BD.mycmd.ExecuteScalar().ToString();
                }

                richTextBox_zs.ReadOnly  = false;
                richTextBox_xbs.ReadOnly = false;
                richTextBox_jws.ReadOnly = true;

                MessageBox.Show("接诊成功,请开始诊断");
            }
            catch { MessageBox.Show("无效操作!"); }
        }
Exemple #7
0
        //read the register information
        private void button_read_d_Click(object sender, EventArgs e)
        {
            DAL BD = new DAL();

            BD.ConnDB();
            Register re = new Register();

            re.mz = textBox_mz_d.Text;

            BD.show(re.mz, "zlk");
            if (BD.mycmd.ExecuteScalar() != null)
            {
                textBox_zlk_d.Text = BD.mycmd.ExecuteScalar().ToString();
            }
            else
            {
                MessageBox.Show("查无此号,请重新输入");
            }

            BD.show(re.mz, "name");
            if (BD.mycmd.ExecuteScalar() != null)
            {
                textBox_name_d.Text = BD.mycmd.ExecuteScalar().ToString();
            }
            BD.show(re.mz, "age");
            if (BD.mycmd.ExecuteScalar() != null)
            {
                textBox_age_d.Text = BD.mycmd.ExecuteScalar().ToString();
            }
            BD.show(re.mz, "sr");
            if (BD.mycmd.ExecuteScalar() != null)
            {
                textBox_sr_d.Text = BD.mycmd.ExecuteScalar().ToString();
            }
            BD.show(re.mz, "cid");
            if (BD.mycmd.ExecuteScalar() != null)
            {
                textBox_cid_d.Text = BD.mycmd.ExecuteScalar().ToString();
            }
            BD.show(re.mz, "sex");
            if (BD.mycmd.ExecuteScalar() != null)
            {
                textBox_sex_d.Text = BD.mycmd.ExecuteScalar().ToString();
            }
            BD.show(re.mz, "nat");
            if (BD.mycmd.ExecuteScalar() != null)
            {
                textBox_nat_d.Text = BD.mycmd.ExecuteScalar().ToString();
            }
            BD.show(re.mz, "dep");
            if (BD.mycmd.ExecuteScalar() != null)
            {
                textBox_dep_d.Text = BD.mycmd.ExecuteScalar().ToString();
            }
            BD.show(re.mz, "doc");
            if (BD.mycmd.ExecuteScalar() != null)
            {
                textBox_doc_d.Text = BD.mycmd.ExecuteScalar().ToString();
            }
            BD.show(re.mz, "rtime");
            if (BD.mycmd.ExecuteScalar() != null)
            {
                comboBox_rtime_d.Text = BD.mycmd.ExecuteScalar().ToString();
            }
            BD.show(re.mz, "rdate");
            if (BD.mycmd.ExecuteScalar() != null)
            {
                dateTimePicker_rdate_d.Text = BD.mycmd.ExecuteScalar().ToString();
            }
            BD.show(re.mz, "regs");
            if (BD.mycmd.ExecuteScalar() != null)
            {
                textBox_rs_d.Text = BD.mycmd.ExecuteScalar().ToString();
            }
            BD.show(re.mz, "chas");
            if (BD.mycmd.ExecuteScalar() != null)
            {
                textBox_chas_d.Text = BD.mycmd.ExecuteScalar().ToString();
            }
            BD.show(re.mz, "pay");
            if (BD.mycmd.ExecuteScalar() != null)
            {
                textBox_pay_d.Text = BD.mycmd.ExecuteScalar().ToString();
            }
        }