湖南科技大学VC ++课程设计(论文)
}
MB_INFO(\欢迎进入公司人事管理系统!\
}
CMyView::~CMyView() { }
void CMyView::DoDataExchange(CDataExchange* pDX) { CRecordView::DoDataExchange(pDX); //{{AFX_DATA_MAP(CMyView)
DDX_FieldText(pDX, IDC_EDIT1, m_pSet->m_column1, m_pSet); DDX_FieldText(pDX, IDC_EDIT2, m_pSet->m_column2, m_pSet); DDX_FieldText(pDX, IDC_EDIT3, m_pSet->m_column3, m_pSet); DDX_FieldText(pDX, IDC_EDIT4, m_pSet->m_column4, m_pSet); DDX_FieldText(pDX, IDC_EDIT5, m_pSet->m_column5, m_pSet); DDX_FieldText(pDX, IDC_EDIT6, m_pSet->m_column6, m_pSet); DDX_FieldText(pDX, IDC_EDIT7, m_pSet->m_column7, m_pSet); DDX_FieldText(pDX, IDC_EDIT8, m_pSet->m_column8, m_pSet); DDX_FieldText(pDX, IDC_EDIT9, m_pSet->m_column9, m_pSet); //}}AFX_DATA_MAP
}
21
湖南科技大学VC ++课程设计(论文)
BOOL CMyView::PreCreateWindow(CREATESTRUCT& cs) { }
void CMyView::OnInitialUpdate() { }
/////////////////////////////////////////////////////////////////////////////
// CMyView printing
BOOL CMyView::OnPreparePrinting(CPrintInfo* pInfo) {
// default preparation
return DoPreparePrinting(pInfo); m_pSet = &GetDocument()->m_mySet; CRecordView::OnInitialUpdate(); GetParentFrame()->RecalcLayout(); ResizeParentToFit();
return CRecordView::PreCreateWindow(cs);
// TODO: Modify the Window class or styles here by modifying // the CREATESTRUCT cs
22
湖南科技大学VC ++课程设计(论文)
}
void CMyView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/) { }
void CMyView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/) { }
/////////////////////////////////////////////////////////////////////////////
// CMyView diagnostics
#ifdef _DEBUG
void CMyView::AssertValid() const { }
void CMyView::Dump(CDumpContext& dc) const { }
23
// TODO: add extra initialization before printing
// TODO: add cleanup after printing
CRecordView::AssertValid();
CRecordView::Dump(dc);
湖南科技大学VC ++课程设计(论文)
CMyDoc* CMyView::GetDocument() // non-debug version is inline { }
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CMyView database support
CRecordset* CMyView::OnGetRecordset() { }
/////////////////////////////////////////////////////////////////////////////
// CMyView message handlers
void CMyView::Ontianjia() {
// TODO: Add your control notification handler code here m_pSet->AddNew(); return m_pSet;
ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CMyDoc))); return (CMyDoc*)m_pDocument;
UpdateData(FALSE);
24
湖南科技大学VC ++课程设计(论文)
}
void CMyView::Onshanchu() { // TODO: Add your control notification handler code here
m_pSet->Delete();
m_pSet->MoveNext(); if(m_pSet->IsEOF()) m_pSet->MoveLast(); if(m_pSet->IsBOF())
m_pSet->SetFieldNull(NULL); UpdateData(FALSE); } void CMyView::Onshaixuan()
{ // TODO: Add your control notification handler code here
CIDD_DIALOG2 IDD_DIALOG2; IDD_DIALOG2.DoModal(); CString value;
if( IDD_DIALOG2. DoModal()==IDOK)
{value=\职工编号=+\ m_pSet->m_strFilter=value; m_pSet->Requery(); UpdateData(FALSE); }
void CMyView::Onpaixu() { // TODO: Add your control notification handler code here
m_pSet->m_strSort=\职工编号\
25
湖南科技大学VC ++课程设计(论文)
m_pSet->Requery(); UpdateData(FALSE); }
26