Exemplo n.º 1
0
        private void txtZyh_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
            {
                string zyh = this.txtZyh.Text.Trim();

                if (zyh == "")
                {
                    MessageBox.Show("请输入住院号.", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    return;
                }

                clsDcl_CommonFind objFind = new clsDcl_CommonFind();
                DataTable         dt;
                long l = objFind.m_lngGetPatientinfoByZyh(zyh, out dt);
                if (l > 0 && dt.Rows.Count > 0)
                {
                    DataRow Dr;
                    if (dt.Rows.Count == 1)
                    {
                        Dr = dt.Rows[0];
                    }
                    else
                    {
                        frmAidChooseZyh f = new frmAidChooseZyh(dt);
                        if (f.ShowDialog() == DialogResult.OK)
                        {
                            Dr = f.DR;
                        }
                        else
                        {
                            return;
                        }
                    }

                    this.txtZyh.Tag   = Dr["registerid_chr"].ToString();
                    this.lblZycs.Text = Dr["inpatientcount_int"].ToString();
                    this.lblName.Text = Dr["lastname_vchr"].ToString();
                }
                else
                {
                    this.txtZyh.Tag   = "";
                    this.lblZycs.Text = "";
                    this.lblName.Text = "";
                    MessageBox.Show("没有找到满足条件的病人记录.", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Stop);
                    this.txtZyh.SelectAll();
                    this.txtZyh.Focus();
                }
            }
        }
Exemplo n.º 2
0
 /// <summary>
 /// 构造
 /// </summary>
 public clsCtl_AreaBedInfo()
 {
     objSvc = new clsDcl_CommonFind();
 }