发布时间 : 星期日 文章数据库课程设计报告(员工培训管理系统)更新完毕开始阅读
UpdateData(TRUE);
_ConnectionPtr m_pConnection; ::CoInitialize(NULL); try { }
catch(_com_error e) { }
//以下插入数据 _variant_t ra;
_bstr_t strAdd=\from training_plan where t_person =\ and t_course = //AfxMessageBox(strAdd); return;
m_pConnection->Execute(strAdd,&ra,adCmdText); m_pConnection->Close(); //以下显示当前数据 CString
WHERE
P_ID=T_PERSON
AND
tmpStr,strSQL=\
FROM
C_ID=T_COURSE
AND
::CoUninitialize();
AfxMessageBox(e.ErrorMessage()); return;
m_pConnection.CreateInstance(\
_bstr_t strConn = \Security=SSPI;Persist Security m_pConnection->Open(strConn,\
Info=False;Initial Catalog=Employee training management system;Data Source=520-002\
\
P_NAME,C_ID,C_NAME,C_TEACHER,C_CLASSROOM,C_CLASSTIME,C_STATE,T_EXAM_DATE TRAINING_PLAN,PERSON,COURSE,APPRISEMENT A_CODE=T_APPRISEMENT and T_PERSON= \
m_adodc2.SetRecordSource(strSQL); m_adodc2.Refresh();
m_datagrid2.ShowWindow(SW_SHOW); AfxMessageBox(\删除课程成功\UpdateData(FALSE);
//查找课程ID
void employer_chioce::OnButton5() {
UpdateData(TRUE);
CString str=\m_adodc1.SetRecordSource(str); m_adodc1.Refresh(); UpdateData(FALSE);
}
void employer_chioce::OnButton6() {exit(0);}
void employer_chioce::OnButton7() { }
this->ShowWindow(SW_HIDE); employer dlg; dlg.DoModal();
this->ShowWindow(SW_SHOW);
void employer_information::OnButton1() {UpdateData(TRUE); }
void employer_information::OnButton2() {
MessageBox(\更新个人信息成功!\UpdateData(TRUE); _variant_t ra;
_bstr_t strAdd=\
strAdd=strAdd+\strAdd=strAdd+\strAdd=strAdd+\
strAdd=strAdd+\CString strSQL=\m_adodc1.SetRecordSource(strSQL); m_adodc1.Refresh();
m_datagrid1.ShowWindow(SW_SHOW); UpdateData(FALSE);
}
strAdd=strAdd+\strAdd=strAdd+\strAdd=strAdd+\strAdd=strAdd+\strAdd=strAdd+\strAdd=strAdd+\strAdd=strAdd+\m_adodc1.SetRecordSource(strAdd); m_adodc1.Refresh();
MessageBox(\更新个人信息成功!\UpdateData(FALSE);
BEGIN_EVENTSINK_MAP(employer_information, CDialog) //{{AFX_EVENTSINK_MAP(employer_information)
ON_EVENT(employer_information, IDC_DATAGRID1, -601 /* DblClick */, OnDblClickDatagrid1, //}}AFX_EVENTSINK_MAP VTS_NONE)
END_EVENTSINK_MAP()
void employer_information::OnDblClickDatagrid1() {
UpdateData(TRUE); int ColNum = 2; CString colVal;
CColumns cols; //要包含的文件头COlumns.h CColumn col; //要包含的文件头COlumn.h VARIANT v_ColNum,v_Value;
cols = m_datagrid1.GetColumns(); //调用GetColumns 返回CDataGrid对应的CColumns对象 v_ColNum.vt = VT_I2;
v_ColNum.iVal = 1; //设置列编号
col = cols.GetItem(v_ColNum);//根据列编号返回CColumn 对象 v_Value = col.GetValue();//读取列值 m_passwd = v_Value.bstrVal; v_ColNum.iVal = 3;
col = cols.GetItem(v_ColNum); v_Value = col.GetValue(); m_name = v_Value.bstrVal; v_ColNum.iVal = 4;
col = cols.GetItem(v_ColNum); v_Value = col.GetValue(); m_sex = v_Value.bstrVal; v_ColNum.iVal = 5;
col = cols.GetItem(v_ColNum); v_Value = col.GetValue(); m_birahday = v_Value.bstrVal;
}
v_ColNum.iVal = 8;
col = cols.GetItem(v_ColNum); v_Value = col.GetValue(); m_edu_level = v_Value.bstrVal; v_ColNum.iVal = 9;
col = cols.GetItem(v_ColNum); v_Value = col.GetValue(); m_speciaty = v_Value.bstrVal; v_ColNum.iVal = 10;
col = cols.GetItem(v_ColNum); v_Value = col.GetValue(); m_address = v_Value.bstrVal; v_ColNum.iVal = 11;
col = cols.GetItem(v_ColNum); v_Value = col.GetValue(); m_tel = v_Value.bstrVal; v_ColNum.iVal = 12;
col = cols.GetItem(v_ColNum); v_Value = col.GetValue(); m_email = v_Value.bstrVal; v_ColNum.iVal = 14;
col = cols.GetItem(v_ColNum); v_Value = col.GetValue(); m_pemark = v_Value.bstrVal; UpdateData(FALSE);
void employer_information::OnButton4() { }
void employer_information::OnButton6() { }
exit(0);
this->ShowWindow(SW_HIDE); employer dlg; dlg.DoModal();
this->ShowWindow(SW_SHOW);