📄 trainexpeinfodlg.cpp
字号:
((CDateTimeCtrl*)GetDlgItem(IDC_DTP_TR_SET3))->SetTime(&sysTime);
((CComboBox*)GetDlgItem(IDC_COMBO_TR_DIP2))->SetCurSel(0);
((CComboBox*)GetDlgItem(IDC_COMBO_TR_DIP3))->SetCurSel(0);
}
/*********************************************************************
函数说明: 使内容可以编辑
函数参数:
*********************************************************************/
void TrainExpeInfoDlg::CtrlStatus_TrainE(BOOL bStatus)
{
((CDateTimeCtrl*)GetDlgItem(IDC_DTP_TR_SBT1))->EnableWindow(bStatus);
((CDateTimeCtrl*)GetDlgItem(IDC_DTP_TR_SBT2))->EnableWindow(bStatus);
((CDateTimeCtrl*)GetDlgItem(IDC_DTP_TR_SBT3))->EnableWindow(bStatus);
((CDateTimeCtrl*)GetDlgItem(IDC_DTP_TR_SET1))->EnableWindow(bStatus);
((CDateTimeCtrl*)GetDlgItem(IDC_DTP_TR_SET2))->EnableWindow(bStatus);
((CDateTimeCtrl*)GetDlgItem(IDC_DTP_TR_SET3))->EnableWindow(bStatus);
((CEdit*)GetDlgItem(IDC_EDIT_TR_SCHOOL1))->EnableWindow(bStatus);
((CEdit*)GetDlgItem(IDC_EDIT_TR_SCHOOL2))->EnableWindow(bStatus);
((CEdit*)GetDlgItem(IDC_EDIT_TR_SCHOOL3))->EnableWindow(bStatus);
((CEdit*)GetDlgItem(IDC_EDIT_TR_SPE1))->EnableWindow(bStatus);
((CEdit*)GetDlgItem(IDC_EDIT_TR_SPE2))->EnableWindow(bStatus);
((CEdit*)GetDlgItem(IDC_EDIT_TR_SPE3))->EnableWindow(bStatus);
((CEdit*)GetDlgItem(IDC_EDIT_TR_ADDR1))->EnableWindow(bStatus);
((CEdit*)GetDlgItem(IDC_EDIT_TR_ADDR2))->EnableWindow(bStatus);
((CEdit*)GetDlgItem(IDC_EDIT_TR_ADDR3))->EnableWindow(bStatus);
((CEdit*)GetDlgItem(IDC_EDIT_TR_SM1))->EnableWindow(bStatus);
((CEdit*)GetDlgItem(IDC_EDIT_TR_SM2))->EnableWindow(bStatus);
((CEdit*)GetDlgItem(IDC_EDIT_TR_SM3))->EnableWindow(bStatus);
((CComboBox*)GetDlgItem(IDC_COMBO_TR_DIP1))->EnableWindow(bStatus);
((CComboBox*)GetDlgItem(IDC_COMBO_TR_DIP2))->EnableWindow(bStatus);
((CComboBox*)GetDlgItem(IDC_COMBO_TR_DIP3))->EnableWindow(bStatus);
((CEdit*)GetDlgItem(IDC_EDIT_TR_MOREREMARK))->EnableWindow(bStatus);
}
/*********************************************************************
函数说明: 显示教育经历信息
函数参数: nID 员工编号
*********************************************************************/
void TrainExpeInfoDlg::GetTrainEInfoFromDB()
{
CADOOperation ADOdbo;
CString SQL;
CString strFields[] = {""};
CString strFieldsValue[24] = {""}; // 家庭信息所有字段有32个
int nFieldsCount = 24;
SQL.Format("select * from Employee_TrainExpe_Table \
where employee_ID = %d AND employee_IDCard = '%s'",
g_nEmployee_ID, g_strEmployee_IDCard);
ADOdbo.OpenRecordset(SQL);
ADOdbo.GetFieldsValue(strFields, nFieldsCount, strFieldsValue, TRUE);
ADOdbo.CloseRecorset();
CFuncOper FunOper;
FunOper.SetFieldValueToCTime(this, IDC_DTP_TR_SBT1, strFieldsValue[2]);
FunOper.SetFieldValueToCTime(this, IDC_DTP_TR_SET1, strFieldsValue[3]);
FunOper.SetFieldValueToCEdit(this, IDC_EDIT_TR_SCHOOL1, strFieldsValue[4]);
FunOper.SetFieldValueToCEdit(this, IDC_EDIT_TR_ADDR1, strFieldsValue[5]);
FunOper.SetFieldValueToCEdit(this, IDC_EDIT_TR_SPE1, strFieldsValue[6]);
FunOper.SetFieldValueToCCombox(this, IDC_COMBO_TR_DIP1, strFieldsValue[7]);
FunOper.SetFieldValueToCEdit(this, IDC_EDIT_TR_SM1, strFieldsValue[8]);
FunOper.SetFieldValueToCTime(this, IDC_DTP_TR_SBT2, strFieldsValue[9]);
FunOper.SetFieldValueToCTime(this, IDC_DTP_TR_SET3, strFieldsValue[10]);
FunOper.SetFieldValueToCEdit(this, IDC_EDIT_TR_SCHOOL2, strFieldsValue[11]);
FunOper.SetFieldValueToCEdit(this, IDC_EDIT_TR_ADDR2, strFieldsValue[12]);
FunOper.SetFieldValueToCEdit(this, IDC_EDIT_TR_SPE2, strFieldsValue[13]);
FunOper.SetFieldValueToCCombox(this, IDC_COMBO_TR_DIP2, strFieldsValue[14]);
FunOper.SetFieldValueToCEdit(this, IDC_EDIT_TR_SM2, strFieldsValue[15]);
FunOper.SetFieldValueToCTime(this, IDC_DTP_TR_SBT3, strFieldsValue[16]);
FunOper.SetFieldValueToCTime(this, IDC_DTP_TR_SET3, strFieldsValue[17]);
FunOper.SetFieldValueToCEdit(this, IDC_EDIT_TR_SCHOOL3, strFieldsValue[18]);
FunOper.SetFieldValueToCEdit(this, IDC_EDIT_TR_ADDR3, strFieldsValue[19]);
FunOper.SetFieldValueToCEdit(this, IDC_EDIT_TR_SPE3, strFieldsValue[20]);
FunOper.SetFieldValueToCCombox(this, IDC_COMBO_TR_DIP3, strFieldsValue[21]);
FunOper.SetFieldValueToCEdit(this, IDC_EDIT_TR_SM3, strFieldsValue[22]);
FunOper.SetFieldValueToCEdit(this, IDC_EDIT_TR_MOREREMARK,strFieldsValue[23]);
}
/*********************************************************************
函数说明: 所有填写内容的 合法性 检查
函数参数:
*********************************************************************/
BOOL TrainExpeInfoDlg::CheckAllInfo_TrainE()
{
if (!g_bQueryToShow)
{
if (g_In_nID == 0 && g_In_strIDCard == "")
{
MessageBox("按照正确的录入顺序,请您先填写【基本信息】页面内容 ", "提示", MB_OK | MB_ICONEXCLAMATION);
return FALSE;
}
}
CFuncOper FunOper;
if (!FunOper.CheckType_CTimePicker(this, IDC_DTP_TR_SBT1, Train_StuBegTime1))
{
return FALSE;
}
if (!FunOper.CheckType_CTimePicker(this, IDC_DTP_TR_SET1, Train_StuEndTime1))
{
return FALSE;
}
if (!FunOper.CheckType_CEdit(this, IDC_EDIT_TR_SCHOOL1, "教育培训经历1中的【教育机构】", Train_TrainSchool1, FALSE))
{
return FALSE;
}
if (!FunOper.CheckType_CEdit(this, IDC_EDIT_TR_SPE1, "教育培训经历1中的【专业】", Train_Speciality1, FALSE))
{
return FALSE;
}
if (!FunOper.CheckType_CEdit(this, IDC_EDIT_TR_ADDR1, "教育培训经历1中的【地点】", Train_TrainAddress1, FALSE))
{
return FALSE;
}
if (!FunOper.CheckType_CComBox(this, IDC_COMBO_TR_DIP1, "教育培训经历1中的【学历】", Train_Diploma1))
{
return FALSE;
}
if (!FunOper.CheckType_CEdit(this, IDC_EDIT_TR_SM1, "教育培训经历1中的【学习方式】", Train_StudyMode1, TRUE))
{
return FALSE;
}
if (!FunOper.CheckType_CTimePicker(this, IDC_DTP_TR_SBT2, Train_StuBegTime2))
{
return FALSE;
}
if (!FunOper.CheckType_CTimePicker(this, IDC_DTP_TR_SET2, Train_StuEndTime2))
{
return FALSE;
}
if (!FunOper.CheckType_CEdit(this, IDC_EDIT_TR_SCHOOL2, "教育培训经历2中的【教育机构】", Train_TrainSchool2, TRUE))
{
return FALSE;
}
if (!FunOper.CheckType_CEdit(this, IDC_EDIT_TR_SPE2, "教育培训经历2中的【专业】", Train_Speciality2, TRUE))
{
return FALSE;
}
if (!FunOper.CheckType_CEdit(this, IDC_EDIT_TR_ADDR2, "教育培训经历2中的【地点】", Train_TrainAddress2, TRUE))
{
return FALSE;
}
if (!FunOper.CheckType_CComBox(this, IDC_COMBO_TR_DIP2, "教育培训经历2中的【学历】", Train_Diploma2))
{
return FALSE;
}
if (!FunOper.CheckType_CEdit(this, IDC_EDIT_TR_SM2, "教育培训经历2中的【学习方式】", Train_StudyMode2, TRUE))
{
return FALSE;
}
if (!FunOper.CheckType_CTimePicker(this, IDC_DTP_TR_SBT3, Train_StuBegTime3))
{
return FALSE;
}
if (!FunOper.CheckType_CTimePicker(this, IDC_DTP_TR_SET3, Train_StuEndTime3))
{
return FALSE;
}
if (!FunOper.CheckType_CEdit(this, IDC_EDIT_TR_SCHOOL3, "教育培训经历3中的【教育机构】", Train_TrainSchool3, TRUE))
{
return FALSE;
}
if (!FunOper.CheckType_CEdit(this, IDC_EDIT_TR_SPE3, "教育培训经历3中的【专业】", Train_Speciality3, TRUE))
{
return FALSE;
}
if (!FunOper.CheckType_CEdit(this, IDC_EDIT_TR_ADDR3, "教育培训经历3中的【地点】", Train_TrainAddress3, TRUE))
{
return FALSE;
}
if (!FunOper.CheckType_CComBox(this, IDC_COMBO_TR_DIP3, "教育培训经历3中的【学历】", Train_Diploma3))
{
return FALSE;
}
if (!FunOper.CheckType_CEdit(this, IDC_EDIT_TR_SM3, "教育培训经历3中的【学习方式】", Train_StudyMode3, TRUE))
{
return FALSE;
}
if (!FunOper.CheckType_CEdit(this, IDC_EDIT_TR_MOREREMARK, "", Train_Remark, TRUE))
{
return FALSE;
}
return TRUE;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -