void CStudentChooserDlg::DoDataExchange( CDataExchange* pDX ) { CDialog::DoDataExchange( pDX ); DDX_Control( pDX, IDC_SEARCHFIRSTNAME, searchFirstName ); DDX_Control( pDX, IDC_SEARCHLASTNAME, searchLastName ); DDX_Control( pDX, IDC_SEARCHSSN, searchSSN ); DDX_Control( pDX, IDC_SEARCHCHECK, searchCheck ); DDX_Control( pDX, IDC_STUDENTLIST, studentList ); DDX_Control( pDX, IDC_NEWSTUDENT, newButton ); DDX_Control( pDX, IDC_OPENSTUDENT, openButton ); DDX_Control( pDX, IDC_SEARCHBUTTON, searchButton ); DDX_Control( pDX, IDC_SEARCHSCHOOLYEAR, schoolYearList ); searchCheck.SetCheck( 1 ); schoolYearList.DisableNull(); schoolYearList.SetList( storage.GetSchoolYearList() ); RefreshStudentList(); searchLastName.SetFocus(); if ( !user.CanWrite() ) { newButton.EnableWindow( FALSE ); } try { schoolYearList.Select( preferences.GetInt( "CurrentSchoolYear" ) ); RefreshStudentList(); } catch (...) {} }
void CMainWindow::OnUpdateFileDelete( CCmdUI* pCmdUI ) { pCmdUI->Enable( user.CanWrite() && MDIGetActive() && MDIGetActive()->IsKindOf( RUNTIME_CLASS( CStudentChooserWnd ) ) && chooser->IsWindowVisible() ); }
void CMainWindow::OnUpdateFileSave( CCmdUI* pCmdUI ) { pCmdUI->Enable( user.CanWrite() && MDIGetActive() && MDIGetActive()->IsKindOf( RUNTIME_CLASS( CStudentEditWnd ) ) && ((CStudentEditWnd*)MDIGetActive())->IsModified() ); }
void CMainWindow::OnUpdateFileShowOptionsOnNew( CCmdUI* pCmdUI ) { pCmdUI->Enable( user.CanWrite() ); pCmdUI->SetCheck( ( preferences.GetBool("ShowNewStudentOptions") ? 1 : 0 ) ); }
void CMainWindow::OnUpdateFileNew( CCmdUI* pCmdUI ) { pCmdUI->Enable( user.CanWrite() ); }