Beispiel #1
0
        /// <summary>
        /// 把记录的值显示到界面上。
        /// </summary>
        /// <param name="p_objContent"></param>
        private void m_mthSetGUIFromContent(clsDept_Desc p_objContent)
        {
            if (p_objContent == null)
            {
                return;
            }

            m_txtAddress.Text = p_objContent.m_strAddress;

            m_cboCategory.SelectedIndex = p_objContent.m_strCategory == "临床" ? 0 : 1;
            try
            {
                m_cboInPatientOrOutPatient.SelectedIndex = int.Parse(p_objContent.m_strInPatientOrOutPatient.Trim());
            }
            catch
            {
                if (p_objContent.m_strInPatientOrOutPatient == "门诊")
                {
                    m_cboInPatientOrOutPatient.SelectedIndex = 0;
                }
                else if (p_objContent.m_strInPatientOrOutPatient == "住院")
                {
                    m_cboInPatientOrOutPatient.SelectedIndex = 1;
                }
                if (p_objContent.m_strInPatientOrOutPatient == "检验")
                {
                    m_cboInPatientOrOutPatient.SelectedIndex = 2;
                }
            }
//			m_cboInPatientOrOutPatient.SelectedIndex=p_objContent.m_strInPatientOrOutPatient=="住院" ? 1:0;
            m_txtDeptID.Text   = p_objContent.m_strDeptID;
            m_txtDeptName.Text = p_objContent.m_strDeptName;
            m_txtPYCode.Text   = p_objContent.m_strPYCode;
            m_txtShortNO.Text  = p_objContent.m_strShortNO;
        }
Beispiel #2
0
        private void m_cmdOK_Click(object sender, System.EventArgs e)
        {
            clsDept_Desc objContent = m_objGetContentFromGUI();

            if (objContent != null)
            {
                this.DialogResult = DialogResult.Yes;
                this.Close();
            }
        }
Beispiel #3
0
 /// <summary>
 /// 出院科室SelectedIndexChanged事件
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void m_cboOutDept_SelectedIndexChanged(object sender, EventArgs e)
 {
     m_objCurrentDept = null;
     m_lsvRecordList.Items.Clear();
     if (m_cboOutDept.Items.Count > 0 && m_cboOutDept.SelectedIndex >= 0)
     {
         clsDept_Desc objDept = m_cboOutDept.SelectedItem as clsDept_Desc;
         if (objDept != null)
         {
             m_objCurrentDept = objDept;
         }
     }
 }
 private void m_cboOutDept_SelectedIndexChanged(object sender, EventArgs e)
 {
     m_objCurrentDept = null;
     m_lsvResultList.Items.Clear();
     m_lblSearchNums.Text = "共计0个出院病人";
     if (m_cboOutDept.Items.Count > 0 && m_cboOutDept.SelectedIndex >= 0)
     {
         clsDept_Desc objDept = m_cboOutDept.SelectedItem as clsDept_Desc;
         if (objDept != null)
         {
             m_objCurrentDept = objDept;
         }
     }
 }
Beispiel #5
0
        public frmDeptDetailInfo(clsDept_Desc p_objDept_Desc)
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();
            m_cboCategory.ClearItem();
            m_cboInPatientOrOutPatient.ClearItem();
            m_cboCategory.AddRangeItems(new string[] { "临床", "辅助" });
            m_cboInPatientOrOutPatient.AddRangeItems(new string[] { "门诊", "住院", "检验" });
            m_cboCategory.SelectedIndex = 0;
            m_cboInPatientOrOutPatient.SelectedIndex = 0;


            //
            // TODO: Add any constructor code after InitializeComponent call
            //
            m_objDept_Desc = p_objDept_Desc;
            m_mthSetGUIFromContent(p_objDept_Desc);
        }
Beispiel #6
0
        /// <summary>
        /// 从界面获取记录的值。如果界面值出错,返回null。
        /// </summary>
        /// <returns></returns>
        private clsDept_Desc m_objGetContentFromGUI()
        {
            //界面参数校验
            if (this.m_txtDeptID.Text.Length > 7)
            {
                clsPublicFunction.ShowInformationMessageBox("对不起,科室编号不能大于7!");
                m_txtDeptID.Focus();
                return(null);
            }


            if (this.m_txtDeptID.Text.Trim() == "")
            {
                clsPublicFunction.ShowInformationMessageBox("对不起,请填写完整科室编号!");
                m_txtDeptID.Focus();
                return(null);
            }
            else if (this.m_txtDeptName.Text.Trim() == "")
            {
                clsPublicFunction.ShowInformationMessageBox("对不起,请填写完整科室名称!");
                m_txtDeptName.Focus();
                return(null);
            }
            else if (m_cboCategory.SelectedIndex == -1)
            {
                clsPublicFunction.ShowInformationMessageBox("对不起,请选择科室种类!");
                m_cboCategory.Focus();
                return(null);
            }
            else if (m_cboInPatientOrOutPatient.SelectedIndex == -1)
            {
                clsPublicFunction.ShowInformationMessageBox("对不起,请选择科室性质!");
                m_cboInPatientOrOutPatient.Focus();
                return(null);
            }

            //从界面获取表单值
            clsDept_Desc objContent = new clsDept_Desc();

            if (m_objDept_Desc == null)
            {
                objContent.m_dtmCreateDate = DateTime.Parse(new clsPublicDomain().m_strGetServerTime());
                objContent.m_dtmModifyDate = objContent.m_dtmCreateDate;
            }
            else
            {
                objContent.m_dtmCreateDate = m_objDept_Desc.m_dtmCreateDate;
                objContent.m_dtmModifyDate = DateTime.Parse(new clsPublicDomain().m_strGetServerTime());
            }
            objContent.m_strAddress  = m_txtAddress.Text.Trim();
            objContent.m_strCategory = m_cboCategory.SelectedIndex.ToString();
            objContent.m_strInPatientOrOutPatient = m_cboInPatientOrOutPatient.SelectedIndex.ToString();
            objContent.m_strDeptID              = m_txtDeptID.Text.Trim();
            objContent.m_strDeptName            = m_txtDeptName.Text.Trim();
            objContent.m_strPYCode              = m_txtPYCode.Text.Trim();
            objContent.m_strShortNO             = m_txtShortNO.Text.Trim();
            objContent.m_strDeActivedOperatorID = "";

            m_objDept_Desc = objContent;
            return(objContent);
        }