Visual C++项目案例导航

时间:2013-05-30 15:00:09
【文件属性】:

文件名称:Visual C++项目案例导航

文件大小:9.67MB

文件格式:RAR

更新时间:2013-05-30 15:00:09

VC、C、

m_lstBook.DeleteAllItems(); UpdateData(TRUE); m_strReaderName = ""; m_strReaderIDCard = ""; UpdateData(FALSE); if (m_strReaderID == "") { ::AfxMessageBox("请输入读者ID"); return; } m_ReaderSet.m_strFilter="READER_ID='"+m_strReaderID+"'"; m_ReaderSet.Open(); if (m_ReaderSet.IsEOF()) { AfxMessageBox("此读者ID号码不存在!"); m_ReaderSet.Close(); return; } m_strReaderName = m_ReaderSet.m_NAME ; m_strReaderIDCard = m_ReaderSet.m_IDCARD ; m_BorrowInfo.m_strFilter = "BOOK.BOOK_ID = BORROW.BOOK_ID AND READER_ID='" + m_strReaderID + "'"; m_BorrowInfo.Open(); LVITEM lvi; int nNumofCount; CString m_strTime; while (!m_BorrowInfo.IsEOF()) { lvi.mask = LVIF_TEXT | LVIF_IMAGE | LVIF_PARAM; nNumofCount = m_lstBook.GetItemCount(); lvi.iItem = nNumofCount; lvi.iSubItem = 0; lvi.pszText = m_BorrowInfo.m_strBookName.GetBuffer(0) ; m_lstBook.InsertItem(&lvi); m_strTime = m_BorrowInfo.m_dtBorrowDate.Format("%D"); m_lstBook.SetItemText(nNumofCount,1, m_strTime); m_BorrowInfo.MoveNext(); } UpdateData(FALSE); m_BorrowInfo.Close(); m_ReaderSet.Close();


网友评论

  • 有用,其中的案例给了解决问题的思路
  • 对有一定C基础的人很有帮助的