private void dataGridView2_CellClick(object sender, DataGridViewCellEventArgs e)
 {
     if (dataGridView2.CurrentCell.ColumnIndex == 4)
     {
         string    _strTableChapter = dataGridView2.CurrentRow.Cells["CHAPTER_NAME"].Value.ToString();
         string    _strDataDetail   = dataGridView2.CurrentRow.Cells["DATA_DETAIL"].Value.ToString();
         DBTemplet dt = new DBTemplet(_strTableChapter, _strDataDetail);
         dt.ShowDialog();
         if (dt.m_bSave)
         {
             dataGridView2.CurrentRow.Cells["DATA_DETAIL"].Value = dt.m_strDataDetail;
             dataGridView2.CurrentRow.Cells["CLASS"].Value       = dt.m_strClass;
             SaveChapter();
         }
     }
 }
Beispiel #2
0
 /// <summary>
 /// 初始化上传数据库信息
 /// </summary>
 /// <param name="p_strPatientId"></param>
 /// <param name="p_strVisitId"></param>
 public static void InitPatDBInfo(string p_strPatientId, string p_strVisitId)
 {
     try
     {
         m_dsPatDBInfo.Tables.Clear();
         DataSet   _dsObj  = DBTemplet.GetSQL();
         DataRow[] _arrSQL = _dsObj.Tables[0].Select("name like '#%'");
         foreach (DataRow var in _arrSQL)
         {
             string _strName = var["NAME"].ToString().ToUpper().Replace("#", "");
             string _strSQL  = var["SQL"].ToString().ToUpper();
             _strSQL = string.Format(_strSQL.Replace("@PATIENT_ID", p_strPatientId).Replace("@VISIT_ID", p_strVisitId));
             DataTable _dtTemp = CommonFunction.OleExecuteBySQL(_strSQL, _strName, PublicVar.m_strEmrConnection);
             m_dsPatDBInfo.Tables.Add(_dtTemp.Copy());
         }
     }
     catch (Exception ex)
     {
         CommonFunction.WriteError(ex.Message);;
     }
 }
        private void dataGridView2_CellClick(object sender, DataGridViewCellEventArgs e)
        {

            if (dataGridView2.CurrentCell.ColumnIndex == 4)
            {
                string _strTableChapter = dataGridView2.CurrentRow.Cells["CHAPTER_NAME"].Value.ToString();
                string _strDataDetail = dataGridView2.CurrentRow.Cells["DATA_DETAIL"].Value.ToString();
                DBTemplet dt = new DBTemplet(_strTableChapter, _strDataDetail);
                dt.ShowDialog();
                if (dt.m_bSave)
                {
                    dataGridView2.CurrentRow.Cells["DATA_DETAIL"].Value = dt.m_strDataDetail;
                    dataGridView2.CurrentRow.Cells["CLASS"].Value = dt.m_strClass;
                    SaveChapter();
                }

            }
        }