newntui/commonresources/src/filterlist.cpp
//---------------------------------------------------------------------------------------
// When user press "Apply" button all changes will be saved in the parent and filter
// will be applyed. The same will happen when user press OK button.
//---------------------------------------------------------------------------------------
When user press "Apply" button all changes will be saved in the parent and filter
will be applyed. The same will happen when user press OK button.
When user press " Apply " button all changes will be saved in the parent and filter will be applyed . The same will happen when user press OK button .
BOOL CFilterList::OnApply() {
FilterSheet*   parent;
CQueryResults* ctrl;
    parent=(FilterSheet *)GetParent();
    if(parent->GetActiveIndex()==0) {
	   UpdateParentName();
	   ctrl=parent->m_QueryResults;
	   if(ctrl!=NULL) {
	      CString filterQuery;
	      if(parent->m_Command.GetLength()>0)
	         filterQuery.Format("filter {%s}",parent->m_Command);
	      else
		     filterQuery=""; 
          ctrl->SetFilter(filterQuery);
          ctrl->Update();
	   }
	}
	return CPropertyPage::OnApply();
}
BOOL CFilterList :: OnApply ( ) { FilterSheet * parent ; CQueryResults * ctrl ; parent = ( FilterSheet * ) GetParent ( ) ; if ( parent -> GetActiveIndex ( ) == 0 ) { UpdateParentName ( ) ; ctrl = parent -> m_QueryResults ; if ( ctrl != NULL ) { CString filterQuery ; if ( parent -> m_Command . GetLength ( ) > 0 ) filterQuery . Format ( " " , parent -> m_Command ) ; else filterQuery = " " ; ctrl -> SetFilter ( filterQuery ) ; ctrl -> Update ( ) ; } } return CPropertyPage :: OnApply ( ) ; }
When user press "Apply" button all changes will be saved in the parent and filter
will be applyed.
When user press " Apply " button all changes will be saved in the parent and filter will be applyed .