Пример #1
0
        /// <summary>
        /// 键盘事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void lueAnaesthesiaUser_KeyPress(object sender, KeyPressEventArgs e)
        {
            try
            {
                if (e.KeyChar == 13)//lueOperCode.Text.Trim() != null &&
                {
                    GoType     = "operate";
                    MZDiagType = "anaesthetist";
                    inputText  = lueAnaesthesiaUser.Text.Trim();

                    IemNewDiagInfo diagInfo = new IemNewDiagInfo(m_App, dtDoc, GoType, MZDiagType, inputText);
                    if (diagInfo.GetFormResult())
                    {
                        diagInfo.ShowDialog();
                        if (diagInfo.IsClosed)
                        {
                            lueAnaesthesiaUser.Text     = diagInfo.inText;
                            lueAnaesthesiaUser.DiaCode  = diagInfo.inCode;
                            lueAnaesthesiaUser.DiaValue = diagInfo.inText;
                        }
                    }
                    else
                    {
                        lueAnaesthesiaUser.DiaCode   = diagInfo.inCode;
                        lueAnaesthesiaUser.DiaValue  = diagInfo.inText;
                        lueAnaesthesiaUser.Multiline = false;
                    }
                }
            }
            catch (Exception ex)
            {
                DrectSoft.Common.Ctrs.DLG.MyMessageBox.Show(ex.Message);
            }
        }
Пример #2
0
        /// <summary>
        /// 键盘事件
        /// Enter
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void lueOperCode_KeyPress(object sender, KeyPressEventArgs e)
        {
            try
            {
                if (e.KeyChar == 13)//lueOperCode.Text.Trim() != null &&
                {
                    GoType     = "operate";
                    MZDiagType = "operate";
                    inputText  = lueOperCode.Text.Trim();

                    IemNewDiagInfo diagInfo = new IemNewDiagInfo(m_App, dtXY, GoType, MZDiagType, inputText);
                    if (diagInfo.GetFormResult())
                    {
                        diagInfo.ShowDialog();
                        if (diagInfo.IsClosed)
                        {
                            lueOperCode.Text     = diagInfo.inText;
                            lueOperCode.DiaCode  = diagInfo.inCode;
                            lueOperCode.DiaValue = diagInfo.inText;
                        }
                    }
                    else
                    {
                        lueOperCode.DiaCode   = diagInfo.inCode;
                        lueOperCode.DiaValue  = diagInfo.inText;
                        lueOperCode.Multiline = false;
                    }
                }
            }
            catch (Exception ex)
            {
                MyMessageBox.Show(1, ex);
            }
        }
Пример #3
0
        public void diagInfo_FormClosed(object sender, EventArgs e)
        {
            try
            {
                IemNewDiagInfo diagInfo = (IemNewDiagInfo)sender;
                if (diagInfo.IsClosed)
                {
                    bwj1.Text = diagInfo.inText;
                    //bwj1.DiaCode = string.Empty;

                    bwj1.DiaCode  = diagInfo.inCode;
                    bwj1.DiaValue = diagInfo.inText;
                    bwj1.Focus();
                }
            }
            catch (Exception ex)
            {
                DrectSoft.Common.Ctrs.DLG.MyMessageBox.Show(ex.Message);
            }
        }
Пример #4
0
        private void bwj1_KeyPress(object sender, KeyPressEventArgs e)
        {
            try
            {
                Button btn    = new Button();
                string oldstr = bwj1.Text.Trim();
                //if (bwj1.Text.Trim() == null)
                //{
                //    IemNewDiagInfo diagInfo = new IemNewDiagInfo(m_App, GoType, DiagType, inputText);
                //    if(diagInfo.
                //    //inputText = string.Empty;
                //}
                if (bwj1.Text.Trim() != null && e.KeyChar == 13)
                {
                    if (chkDiagType1.Checked)//西医
                    {
                        DiagType  = "XIYI";
                        inputText = bwj1.Text.Trim();
                        GoType    = "OUTHOSDIAG";
                        IemNewDiagInfo diagInfo = new IemNewDiagInfo(m_App, dtXY, GoType, DiagType, inputText);
                        //inputText = string.Empty;
                        if (diagInfo.GetFormResult())
                        {
                            diagInfo.ShowDialog();
                            if (diagInfo.IsClosed)
                            {
                                bwj1.Text = diagInfo.inText;

                                //bwj1.Enabled = true;

                                bwj1.DiaCode  = diagInfo.inCode;
                                bwj1.DiaValue = diagInfo.inText;
                                bwj1.Focus();
                                bwj1.Enabled = true;

                                //bwj1.Focused = true;
                            }
                        }
                        else
                        {
                            bwj1.DiaCode  = diagInfo.inCode;
                            bwj1.DiaValue = diagInfo.inText;
                            //bwj1.Multiline = false;
                        }
                    }
                    if (chkDiagType2.Checked)//中医
                    {
                        DiagType  = "ZHONGYI";
                        inputText = bwj1.Text.Trim();
                        GoType    = "OUTHOSDIAG";
                        IemNewDiagInfo diagInfo = new IemNewDiagInfo(m_App, dtZY, GoType, DiagType, inputText);
                        //inputText = string.Empty;
                        if (diagInfo.GetFormResult())
                        {
                            diagInfo.ShowDialog();
                            if (diagInfo.IsClosed)
                            {
                                bwj1.Text = diagInfo.inText;

                                //bwj1.Enabled = true;

                                bwj1.DiaCode  = diagInfo.inCode;
                                bwj1.DiaValue = diagInfo.inText;
                                bwj1.Focus();
                                bwj1.Enabled = true;

                                //bwj1.Focused = true;
                            }
                        }
                        else
                        {
                            bwj1.DiaCode  = diagInfo.inCode;
                            bwj1.DiaValue = diagInfo.inText;
                            //bwj1.Multiline = false;
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                DrectSoft.Common.Ctrs.DLG.MyMessageBox.Show(ex.Message);
            }
        }
Пример #5
0
        private string inputText = string.Empty; //获取文本里面的内容

        private void obj_Click(object sender, EventArgs e)
        {
            try
            {
                if (m_OPETYPE == "DIAG")
                {
                    if (chkDiagType1.Checked)//西医
                    {
                        DiagType  = "XIYI";
                        inputText = bwj1.Text.ToString().Trim();
                        GoType    = "OUTHOSDIAG";
                        IemNewDiagInfo diagInfo = new IemNewDiagInfo(m_App, dtXY, GoType, DiagType, inputText);
                        //inputText = string.Empty;
                        if (diagInfo.GetFormResult())
                        {
                            diagInfo.ShowDialog();
                            if (diagInfo.IsClosed)
                            {
                                bwj1.Text     = diagInfo.inText;
                                bwj1.DiaCode  = diagInfo.inCode;
                                bwj1.DiaValue = diagInfo.inText;
                            }
                        }
                        else
                        {
                            bwj1.DiaCode   = diagInfo.inCode;
                            bwj1.DiaValue  = diagInfo.inText;
                            bwj1.Multiline = false;
                        }
                    }
                    if (chkDiagType2.Checked)//中医
                    {
                        DiagType  = "ZHONGYI";
                        inputText = bwj1.Text.ToString().Trim();
                        GoType    = "OUTHOSDIAG";
                        IemNewDiagInfo diagInfo = new IemNewDiagInfo(m_App, dtZY, GoType, DiagType, inputText);
                        //inputText = string.Empty;
                        if (diagInfo.GetFormResult())
                        {
                            diagInfo.ShowDialog();
                            if (diagInfo.IsClosed)
                            {
                                bwj1.Text     = diagInfo.inText;
                                bwj1.DiaCode  = diagInfo.inCode;
                                bwj1.DiaValue = diagInfo.inText;
                            }
                        }
                        else
                        {
                            bwj1.DiaCode   = diagInfo.inCode;
                            bwj1.DiaValue  = diagInfo.inText;
                            bwj1.Multiline = false;
                        }
                    }
                    //GoType = "OUTHOSDIAG";
                    //IemNewDiagInfo diagInfo = new IemNewDiagInfo(m_App, dtZY, GoType, DiagType, inputText);
                    ////inputText = string.Empty;
                    //if (diagInfo.GetFormResult())
                    //{
                    //    diagInfo.ShowDialog();
                    //    if (diagInfo.IsClosed)
                    //    {
                    //        bwj1.Text = diagInfo.inText;
                    //        bwj1.DiaCode = diagInfo.inCode;
                    //        bwj1.DiaValue = diagInfo.inText;
                    //    }
                    //}
                    //else
                    //{
                    //    bwj1.DiaCode = diagInfo.inCode;
                    //    bwj1.DiaValue = diagInfo.inText;
                    //    bwj1.Multiline = false;
                    //}
                }
            }
            catch (Exception ex)
            {
                DrectSoft.Common.Ctrs.DLG.MyMessageBox.Show(ex.Message);
            }
        }