diff --git a/bin/xyylMCWEACSystem.exe b/bin/xyylMCWEACSystem.exe index 959b782..27b4853 100644 Binary files a/bin/xyylMCWEACSystem.exe and b/bin/xyylMCWEACSystem.exe differ diff --git a/xyylMCWEACSystem/datamanager.cpp b/xyylMCWEACSystem/datamanager.cpp index 24b3001..2ab26f0 100644 --- a/xyylMCWEACSystem/datamanager.cpp +++ b/xyylMCWEACSystem/datamanager.cpp @@ -1,5 +1,7 @@ #include "datamanager.h" #include +#include +#include DataManager::DataManager(QObject * parent ) { init(); @@ -17,36 +19,70 @@ DataManager::~DataManager() void DataManager::init() { + QString sFileName = QCoreApplication::applicationDirPath()+"/medicalRecode.db"; + //bool bexist = QFile::exists(sFileName); + //if(bexist) + { + SqlCore::init("QSQLITE","user","passdwd",sFileName); + } initTable(); } void DataManager::initTable() { - /* - 病历管理 - 检查号 - 类型: 住院或门诊 - 姓名 - 性别 男女 - 出生日期 - 年龄 - 左右利Laterality 左右 - 检查日期 inspection - 其他信息 - */ + //病例信息 + { + /* + 病历管理 + 检查号 + 类型: 住院或门诊 + 姓名 + 性别 男女 + 出生日期 + 年龄 + 左右利Laterality 左右 + 检查日期 inspection + 其他信息 + */ - QMap map; - map.insert("f_CheckNum", "TEXT"); - map.insert("f_Type", "TEXT"); - map.insert("f_Name", "TEXT"); - map.insert("f_Sex", "TEXT"); - map.insert("f_Birthday", "TEXT"); - map.insert("f_Year", "TEXT"); - map.insert("f_Laterality", "TEXT"); + QMap map; + map.insert("f_CheckNum", "TEXT"); + map.insert("f_Type", "TEXT"); + map.insert("f_Name", "TEXT"); + map.insert("f_Sex", "TEXT"); + map.insert("f_Birthday", "TEXT"); + map.insert("f_Year", "TEXT"); + map.insert("f_Laterality", "TEXT"); + map.insert("f_Other", "TEXT"); + SqlGenerate sqlGener; + QString sql = sqlGener.createTable("t_RecodManage",map); + qDebug()< map; + map.insert("f_HostpitalName", "TEXT"); + map.insert("f_UserName", "TEXT"); + map.insert("f_Section", "TEXT"); + map.insert("f_UserPasswd", "TEXT"); + map.insert("f_UserNum", "TEXT"); + map.insert("f_RePasswd", "TEXT"); + map.insert("f_DataName", "TEXT"); - SqlGenerate sqlGener; - QString sql = sqlGener.createTable("t_RecodManage",map); - qDebug()<addStretch(); } bool HospitalInfo::initConnect() { - + bool reok; + reok = connect(&m_btnOK,SIGNAL(clicked()),this,SLOT(slotSave())); + if(!reok) + { + qDebug()<<"save connect failed"<