freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

vc學生成績管理系統(tǒng)(參考版)

2024-08-22 12:23本頁面
  

【正文】 pCmdActiveConnection = pConnection。 hr = pConnectionOpen(strCnn,NULL)。 try { //Open a connection UpdateData(TRUE)。 = DISP_E_PARAMNOTFOUND。 _variant_t vNULL。 CString TempStr,TempStrKcm。 _ParameterPtr pParam = NULL。 _CommandPtr pCmd = NULL。 AfxMessageBox(sError)。 pConnectionClose()。 _bstr_t bstrDescription(())。 } catch(__error amp。vNULL,adCmdText)。 pRs = pCmdExecute(amp。),StrXH,StrKCM)。 and KCH in(select KCH from KC where KCM = 39。 (delete from XS_KC where XH=39。 GetDlgItemText(IDC_COMBOKCM,StrKCM)。 CString StrXH,StrKCM。 (__uuidof(Command))。 (__uuidof(Connection))。///定義為無參數(shù) _bstr_t strCnn(SQLCONSTR)。 = VT_ERROR。 _variant_t varFld。 HRESULT hr。 _RecordsetPtr pRs = NULL。}“刪除”Click事件處理,調(diào)用Command執(zhí)行delete刪除當前學號,當前課程名的成績記錄void CStuAddScore::OnButton1() { // TODO: Add your control notification handler code here _ConnectionPtr pConnection = NULL。 //remove place on left SetDlgItemText(IDC_COMBOKCM,strKCM)。 CString strKCM(_T())。 //remove place on left SetDlgItemText(IDC_COMBOXH,strXH)。 CString strXH(_T())。 //remove place on left SetDlgItemText(IDC_COMBOZY,str)。 CString str(_T())。 m_StuXF = 。 m_StuCJ = 。 m_StuXM = strXM。 CString strXM(_T())。 if(pRsadoEOF) return。 pRecordsetQueryInterface(IID_IDispatch, (void **)amp。 _variant_t varFld。 // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE}IDC_ADODC1移動記錄完成的時候,在學號、姓名、成績、學分等顯示控件中顯示當前學生的當前課程的成績信息void CStuAddScore::OnMoveCompleteAdodc1(long adReason, LPDISPATCH pError, long FAR* adStatus, LPDISPATCH pRecordset) { // TODO: Add your control notification handler code here if(m_InitCompleteFlags == 0) return。 m_InitCompleteFlags = 1。 AfxMessageBox(sError)。 pConnectionClose()。 _bstr_t bstrDescription(())。 } catch(__error amp。 } (0)。 (TempStr)。 TempStr = 。vNULL,NULL,adCmdStoredProc)。 //添加專業(yè)List項 pCmdCommandText = GetStuZy。 pRsMoveNext()。 ()。 while(!pRsadoEOF) { varFld = pRsFieldsGetItem(KCM)Value。vNULL,amp。 pCmdCommandText = (_bstr_t)SqlStr。 /*KCM list*/ CString SqlStr。 (__uuidof(Command))。 (__uuidof(Connection))。 ()。 (學分)。 col=(vIndex)。 (成績)。 col=(vIndex)。 (課程名)。 col=(vIndex)。 (姓名)。 col=(vIndex)。 (學號)。 col=(vIndex)。 = VT_UINT。 (3)。 cols = ()。 CColumn col。///定義為無參數(shù) _bstr_t strCnn(SQLCONSTR)。 = VT_ERROR。 _variant_t varFld。 HRESULT hr。 _CommandPtr pCmd = NULL。 //初始化標記……}OnInitDialog通過執(zhí)行select語句從數(shù)據(jù)庫中提取課程名添加到課程下拉列表中去,執(zhí)行GetStuZy存儲過程,把返回的專業(yè)添加到專業(yè)下拉列表中去,在DataGrid中顯示當前專業(yè),當前課程的的學生、成績信息,方便修改BOOL CStuAddScore::OnInitDialog() { CDialog::OnInitDialog()。 update XS_KC set XF = 0 where CJ 60update XS_KC set XF = (select XF from KC where KCH = ) where CJ = 60ENDGO(2) 。主要代碼:(1) SQL Server中定義的存儲過程。 (2) ADODC控件IDC_ADODC1的RecordSource屬性為select * from XS_KC_CJ,XS_KC_CJ為視圖名稱(3) DataGrid窗口IDC_DATAGRID1屬性中AllowUpdate = “Enable”,這樣DataGrid修改才允許更新到視圖中去,從而更新到數(shù)據(jù)庫相應的表中。程序界面: 圖 主要功能:用戶可以選擇專業(yè),這是會列出本專業(yè)所有的學生學號,選擇課程,這時下面的DataGrid中會顯示相應課程的學生的成績和學分,可以在DataGrid中輸入學生成績,上面修改單個學生成績,學分不允許修改,輸入成績,觸發(fā)器會自動添加相應的學分。此過程放在觸發(fā)器CheckXs中完成的 CREATE TRIGGER [CheckXs] ON [dbo].[XS] FOR DELETE ASdelete from XS_KC where XH in( select XH from deleted)7. 學生成績的錄入 目的與要求:了解VC中調(diào)用SQL Server中存儲過程的基本方法。 AfxMessageBox(sError)。 pConnectionClose()。 CString sError。e) { // Notify the user of errors if any. _bstr_t bstrSource(())。 AfxMessageBox(更新成功!)。 ()。 pConnectionClose()。 } pRsUpdate()。 pRsFieldsGetItem(ZP)AppendChunk(varBLOB)。 = VT_ARRAY | VT_UI1。i, pBufEx++)。 i nLength。 psa = SafeArrayCreate(VT_UI1, 1, rgsabound)。 rgsabound[0].lLbound = 0。 //build a SAFFERRAY SAFEARRAY* psa。 //read the file into memory BYTE *pBufEx。 //allocate memory error。 if(pbuf == NULL) { AfxMessageBox(allocate memory error)。 long nLength = ()。 } _variant_t varChunk。 if(0 == (m_StuZPPath,CFile::modeRead)) { AfxMessageBox(Open file error)。 else pRsPutCollect(XB, _variant_t((long)0))。 pRsPutCollect(ZXF, _variant_t((long)m_StuZXF))。 pRsPutCollect(ZY, _variant_t(TempStr))。 int index = ()。 pRsPutCollect(XM, _variant_t(m_StuXM))。 } else { pRsAddNew()。 m_StuZPPath = 。 = psa。 VARIANT varBLOB。 i++) SafeArrayPutElement (psa, amp。 for (long i = 0。 rgsabound[0].cElements = nLength。 SAFEARRAYBOUND rgsabound[1]。 pBufEx = pbuf。 } (pbuf,nLength)。 return。 pbuf = new BYTE[nLength+2]。 BYTE* pbuf。 return。 //有照片更新,存放到數(shù)據(jù)庫 if(m_StuZPPath != ) { CFile imagefile。 if(m_StuXBN == 0) pRsPutCollect(XB, _variant_t((long)1))。 pRsPutCollect(BZ, _variant_t(m_StuBZ))。 (index,TempStr)。 pRsPutCollect(CSSJ, _variant_t((DATE)m_StuCSSJ))。 //read data if(!pRsadoEOF) { pRsPutCollect(XH, _variant_t(m_StuXH))。,m_StuXH)。 (select * from XS where XH = 39。 (__uuidof(Recordset))。 (__uuidof(Connection))。 _bstr_t strCnn(SQLCONSTR)。 CString TempStr。 _ConnectionPtr pConnection = NULL。 } // else // AfxMessageBox(faile)。 //在當前pPicDC設備中繪制照片 if(FAILED(pPicRender(*pPicDC,0,0,(DWORD)fX,(DWORD)fY,0,hmHeight,hmWidth,hmHeight,NULL))) { AfxMessageBox(Render failt)。 fX = () 5。 pStaticGetWindowRect(amp。 //fX = (double)pPicDCGetDeviceCaps(HORZRES)*(double)hmWidth/((double)pPicDCGetDeviceCaps(HORZSIZE)*)。hmHeight)。hmWidth)。 OLE_YSIZE_HIMETRIC hmHeight。 //解析照片數(shù)據(jù) if(SUCCEEDED(OleLoadPicture(m_pStuZPStm,m_StuZPLen,TRUE,IID_IPicture,(LPVOID*)amp。 pPicDC = pStaticGetDC()。 CDC *pPicDC。} 窗口OnPaint消息,調(diào)用OleLoadPicture來解析照片,并顯示到指定的Picture控件中去void
點擊復制文檔內(nèi)容
法律信息相關推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1