Beispiel #1
0
        /// <summary>
        /// 根据页眉选中的页眉,页脚加载实体
        /// </summary>
        private void GetHeaderFootEntity()
        {
            try
            {
                if (lookUpEditorHeader.CodeValue.Trim() != "")
                {
                    m_EmrTempletHeader = m_SQLManger.GetTemplet_Header(lookUpEditorHeader.CodeValue);
                }

                if (lookUpEditorFoot.CodeValue.Trim() != "")
                {
                    m_EmrTemplet_Foot = m_SQLManger.GetTemplet_Foot(lookUpEditorFoot.CodeValue);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        /// <summary>
        /// 保存页眉
        /// </summary>
        private void SaveTemplet_Heard()
        {
            string editType = "";

            //无templetID代表为新增模板
            if (m_EmrTempletHeader.HeaderId == "")
            {
                editType = "1";
                m_EmrTempletHeader.CreatorId = m_app.User.Id;
            }
            else
            {
                editType = "2";
            }
            SQLManger m_sqlmanger = new SQLManger(m_app);

            m_EmrTempletHeader.HospitalCode = this.lookUpEditorHospitel.CodeValue;
            m_EmrTempletHeader.Name         = this.txtName.Text.Trim();
            //页眉中增加图片报错的问题  add by ywk 2012年10月25日 11:58:05
            string strheaderid = m_sqlmanger.SaveTemplet_Header(m_EmrTempletHeader, editType);

            m_EmrTempletHeader = m_sqlmanger.GetTemplet_Header(strheaderid);
        }
Beispiel #3
0
 private void BindEntityByDataRow(DataRow dr)
 {
     try
     {
         m_emrtempletheader          = new EmrTempletHeader();
         m_emrtempletheader.HeaderId = dr["Header_Id"].ToString();
         string StMrName  = null;
         string StContent = null;
         StContent = dr["Content"].ToString();
         if (dr["Name"].ToString() == "知情同意书")//add by Ukey 2016-08-25 处理 知情同意书页眉数量过多
         {
             string    SqlEmrTempFile = @"select mr_name from EMRTEMPLET where templet_id = '" + TempletId + "'";
             DataTable DtEmrTempFile  = m_app.SqlHelper.ExecuteDataTable(SqlEmrTempFile);
             if (DtEmrTempFile.Rows.Count >= 1)
             {
                 DataRow DrDtEmrTempFile = DtEmrTempFile.Rows[0];
                 StMrName  = DrDtEmrTempFile["mr_name"].ToString();
                 StContent = StContent.Replace("知情同意书名称", StMrName);
             }
         }
         else if (dr["Name"].ToString() == "其他记录")//add by Ukey 2016-08-25 处理 其他记录页眉数量过多
         {
             string    SqlEmrTempFile = @"select mr_name from EMRTEMPLET where templet_id = '" + TempletId + "'";
             DataTable DtEmrTempFile  = m_app.SqlHelper.ExecuteDataTable(SqlEmrTempFile);
             if (DtEmrTempFile.Rows.Count >= 1)
             {
                 DataRow DrDtEmrTempFile = DtEmrTempFile.Rows[0];
                 StMrName  = DrDtEmrTempFile["mr_name"].ToString();
                 StContent = StContent.Replace("其他记录名称", StMrName);
             }
         }
         else if (dr["Name"].ToString() == "护理文档")//add by Ukey 2016-08-25 处理 护理文档页眉数量过多
         {
             string    SqlEmrTempFile = @"select mr_name from EMRTEMPLET where templet_id = '" + TempletId + "'";
             DataTable DtEmrTempFile  = m_app.SqlHelper.ExecuteDataTable(SqlEmrTempFile);
             if (DtEmrTempFile.Rows.Count >= 1)
             {
                 DataRow DrDtEmrTempFile = DtEmrTempFile.Rows[0];
                 StMrName  = DrDtEmrTempFile["mr_name"].ToString();
                 StContent = StContent.Replace("护理文档名称", StMrName);
             }
         }
         else if (dr["Name"].ToString() == "手术护理记录")//add by Ukey 2016-08-25 处理 护理文档页眉数量过多
         {
             string    SqlEmrTempFile = @"select mr_name from EMRTEMPLET where templet_id = '" + TempletId + "'";
             DataTable DtEmrTempFile  = m_app.SqlHelper.ExecuteDataTable(SqlEmrTempFile);
             if (DtEmrTempFile.Rows.Count >= 1)
             {
                 DataRow DrDtEmrTempFile = DtEmrTempFile.Rows[0];
                 StMrName  = DrDtEmrTempFile["mr_name"].ToString();
                 StContent = StContent.Replace("手术护理记录名称", StMrName);
             }
         }
         m_emrtempletheader.Name           = dr["Name"].ToString();
         m_emrtempletheader.CreateDatetime = dr["CREATE_DATETIME"].ToString();
         m_emrtempletheader.CreatorId      = dr["CREATOR_ID"].ToString();
         m_emrtempletheader.LastTime       = dr["Last_Time"].ToString();
         m_emrtempletheader.HospitalCode   = dr["Hospital_Code"].ToString();
         m_emrtempletheader.Content        = StContent;
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }