newntui/discovermdi/src/qaparams.cpp
//---------------------------------------------------------------------------------------
// This public function will inspect the currently selected item trying to obtain the
// current result set. If the result set is available it will return TRUE, if not - FALSE.
// Don't try to use it directly in the command enabler - it runs server query and will
// fill communication channel with the  durt data.
//---------------------------------------------------------------------------------------
This public function will inspect the currently selected item trying to obtain the
current result set. If the result set is available it will return TRUE, if not - FALSE.
Don't try to use it directly in the command enabler - it runs server query and will
fill communication channel with the  durt data.
This public function will inspect the currently selected item trying to obtain the current result set . If the result set is available it will return TRUE if not - FALSE . Don ' t try to use it directly in the command enabler - it runs server query and will fill communication channel with the durt data .
BOOL CQAParams::GetCurrentSetEnable(void) {
CString query;
CString hits;
BSTR sysQuery;
CQATree* view;
CString node;
    view=(CQATree* )(((CSplitterWnd *)GetParent())->GetPane(0,0));
    node=(*view->GetCurrentNodeName());
    query.Format("sev_get {%s} hitno",node);
    sysQuery=query.AllocSysString();
    hits=DataSourceAccessSync(&sysQuery);
	SysFreeString(sysQuery); 
	int amount=atoi(hits);
	if(amount<=0) return FALSE;
	return TRUE;
}
BOOL CQAParams :: GetCurrentSetEnable ( void ) { CString query ; CString hits ; BSTR sysQuery ; CQATree * view ; CString node ; view = ( CQATree * ) ( ( ( CSplitterWnd * ) GetParent ( ) ) -> GetPane ( 0 , 0 ) ) ; node = ( * view -> GetCurrentNodeName ( ) ) ; query . Format ( " " , node ) ; sysQuery = query . AllocSysString ( ) ; hits = DataSourceAccessSync ( & sysQuery ) ; SysFreeString ( sysQuery ) ; int amount = atoi ( hits ) ; if ( amount <= 0 ) return FALSE ; return TRUE ; }
This public function will inspect the currently selected item trying to obtain the
current result set.
This public function will inspect the currently selected item trying to obtain the current result set .
// We need the current node name to run the query. // Trying to detect the amount of the elements