zOPER_EXPORT zSHORT OPERATION zwTZCMRPTD_RefreshAllComponents( zVIEW vSubtask ) { zVIEW vTZCMLPLO; zVIEW vTZCMRPTO; zVIEW vCompList; zCHAR szName[ 33 ]; zCHAR szERR_Msg[ 254 ]; if ( GetViewByName( &vTZCMRPTO, "TZCMRPTO", vSubtask, zLEVEL_TASK ) > 0 ) DropObjectInstance( vTZCMRPTO ); if ( zwTZCMLPLD_OptionRefreshFromRepo( vSubtask, &vTZCMLPLO, szName, zRefreshLPLR ) < 0 ) { return( -1 ); } zstrcpy( szERR_Msg, "Project '" ); GetStringFromAttribute( &szERR_Msg[ zstrlen( szERR_Msg ) ], vTZCMLPLO, "LPLR", "Name" ); zstrcat( szERR_Msg, "' has been successfully refreshed." ); MessageSend( vSubtask, "CM00279", "Configuration Management", szERR_Msg, zMSGQ_OBJECT_CONSTRAINT_INFORMATION, zBEEP ); if ( GetViewByName( &vCompList, "CompList", vSubtask, zLEVEL_TASK ) >= 0 ) RefreshWindow( vCompList ); return( 0 ); } // zwTZCMRPTD_RefreshAllComponents
///////////////////////////////////////////////////////////////////////////// // // OPERATION: zwTZERRORD_WriteErrorMsg // // ///////////////////////////////////////////////////////////////////////////// zOPER_EXPORT zSHORT /*LOCAL */ OPERATION zwTZERRORD_WriteErrorMsg( zVIEW vSubtask, zVIEW vMetaView, zPCHAR szMetaEntity, zPCHAR szMetaAttribute, zPCHAR szErrorMsg, zSHORT nError ) { zVIEW vTZERROR; zCHAR szMsg[ 255 ]; if ( GetViewByName( &vTZERROR, "TZERROR", vSubtask, zLEVEL_TASK ) < 0 ) { zwTZERRORD_LoadErrorList( vSubtask ); GetViewByName( &vTZERROR, "TZERROR", vSubtask, zLEVEL_TASK ); } CreateEntity( vTZERROR, "ErrorMsg", zPOS_LAST ); SetAttributeFromAttribute( vTZERROR, "ErrorMsg", "Name", vMetaView, szMetaEntity, szMetaAttribute ); if ( nError == 1 ) zstrcpy( szMsg, "Error: " ); else if ( nError == 0 ) zstrcpy( szMsg, "Warning: " ); zstrcat( szMsg, szErrorMsg ); SetAttributeFromString( vTZERROR, "ErrorMsg", "ErrorText", szMsg ); SetAttributeFromInteger( vTZERROR, "ErrorMsg", "Error", nError ); return( 0 ); } // zwTZERRORD_WriteErrorMsg
zOPER_EXPORT zSHORT OPERATION zwTZVSDBAD_StepOnce( zVIEW vSubtask ) { zVIEW XPG; zVIEW lpZeidonVML; zVIEW vStatementView; zLONG lStepCode; zSHORT nZRetCode; zSHORT RESULT; zLONG lTempInteger_0; lStepCode = Exec_StepOnce( vSubtask ); if ( lStepCode == zXC_OPERATION_EXECUTED ) { nZRetCode = zwTZVSDBAD_Resume( vSubtask ); nZRetCode = SetWindowActionBehavior( vSubtask, zWAB_ReturnToParentWithRefresh, "", "" ); return( -1 ); } nZRetCode = GetViewByName( &lpZeidonVML, "ZeidonVML", vSubtask, zLEVEL_TASK ); nZRetCode = GetViewByName( &XPG, "XPG", lpZeidonVML, zLEVEL_SUBTASK ); nZRetCode = SetNameForView( XPG, "XPG", vSubtask, zLEVEL_SUBTASK ); nZRetCode = GetViewByName( &vStatementView, "StatementView", lpZeidonVML, zLEVEL_SUBTASK ); nZRetCode = GetIntegerFromAttribute( &lTempInteger_0, vStatementView, "Statement", "RelativeLineNumber" ); RESULT = SetCursorFirstEntityByInteger( XPG, "OperationText", "RelativeLineNumber", lTempInteger_0, "" ); return( 0 ); }
zOPER_EXPORT zSHORT OPERATION zwTZVSDBAD_Update( zVIEW vSubtask ) { zVIEW StackObject; zVIEW XPG; zVIEW lpZeidonVML; zSHORT nZRetCode; zSHORT RESULT; zLONG lTempInteger_0; nZRetCode = GetViewByName( &lpZeidonVML, "ZeidonVML", vSubtask, zLEVEL_TASK ); nZRetCode = GetViewByName( &XPG, "XPG", lpZeidonVML, zLEVEL_SUBTASK ); nZRetCode = GetViewByName( &StackObject, "StackObject", vSubtask, zLEVEL_SUBTASK ); nZRetCode = GetIntegerFromAttribute( &lTempInteger_0, StackObject, "Variable", "ID" ); RESULT = SetCursorFirstEntityByInteger( XPG, "Variable", "ID", lTempInteger_0, "" ); if ( CompareAttributeToInteger ( XPG, "Variable", "DataType", 1045 ) != 0 ) { nZRetCode = SetWindowActionBehavior( vSubtask, zWAB_StartModalSubwindow, "TZVSDBAD", "UPDATEVAR" ); } else { zwTZVSDBAD_SpawnObjectBrowser( vSubtask ); } return( 0 ); }
zOPER_EXPORT zSHORT OPERATION zwTZVSDBAD_SpawnObjectBrowser( zVIEW vSubtask ) { zVIEW StackObject; zVIEW lpZeidonVML; zVIEW v; zLONG lDataLth; zSHORT nZRetCode; nZRetCode = GetViewByName( &lpZeidonVML, "ZeidonVML", vSubtask, zLEVEL_TASK ); nZRetCode = GetViewByName( &StackObject, "StackObject", lpZeidonVML, zLEVEL_SUBTASK ); lDataLth = 4; GetBlobFromAttribute( &v, &lDataLth, StackObject, "Variable", "Value" ); if ( v != 0 ) { nZRetCode = StageBrowser( vSubtask, v ); } if ( nZRetCode == -1 ) { MessageSend( vSubtask, "VS00201", "Launcher", "View is not yet valid", zMSGQ_OBJECT_CONSTRAINT_ERROR, zBEEP ); } return( 0 ); }
// // OPERATION: InitializeInterpretor // // DESCRIPTION: InitializeInterpretor does all of the set up for the VML // interpretor. Loads the XPG File. Next be sure that we have access to // the global as well as Zeidon operation lists. Also Init two Globals. // zOPER_EXPORT zSHORT OPERATION InitInterp( zVIEW lpInterpSubtask, zVIEW lpAppSubtask, zPCHAR szSrcDLLName ) { zVIEW vStackObject; // zVIEW vViewObject; zVIEW vTZOPGRPO; zCHAR szExecDir[ zMAX_FILESPEC_LTH + 1 ]; // dir string zSHORT nRC; nRC = LoadXPG( lpInterpSubtask, lpAppSubtask, szSrcDLLName, "C" ); if ( nRC != 0 ) // failed return( -1 ); if ( GetViewByName( &vStackObject, "StackObject", lpInterpSubtask, zLEVEL_SUBTASK ) != zLEVEL_SUBTASK ) { // activate an empty stack object. ActivateEmptyObjectInstance( &vStackObject, "TZVSRTOO", lpInterpSubtask, zSINGLE ); // create the root of the stack object. CreateEntity( vStackObject, "StackObject", zPOS_AFTER ); // Name the Stack Object SetNameForView( vStackObject, "StackObject", lpInterpSubtask, zLEVEL_SUBTASK ); } #if 0 // DGC The following to OIs do not appear to be used anywhere so I'm // removing them so that we don't need an LPLR to be active. // get access to the global operation list and the Zeidon operation list nRC = RetrieveViewForMetaList( vSubtask, &lpGOListView, zREFER_GO_META ); if ( nRC < 0 ) // failed lpGOListView = 0; // get a view to the Task LPLR if ( GetViewByName( &vViewObject, "TaskLPLR", vSubtask, zLEVEL_TASK ) != zLEVEL_TASK ) return( -1 ); #endif if ( GetViewByName( &vTZOPGRPO, "TZOPSIGK.Interp", lpInterpSubtask, zLEVEL_TASK ) != zLEVEL_TASK ) { // get the exec directory zgGetZeidonToolsDir( lpAppSubtask, szExecDir, zAPPL_DIR_OBJECT ); // concat the name. and the .XGO extention strcat_s( szExecDir, zsizeof( szExecDir ), "TZOPSIGK.XGO" ); nRC = ActivateOI_FromFile( &vTZOPGRPO, "TZOPGRPO", lpInterpSubtask, szExecDir, zSINGLE ); if ( nRC < 0 ) // failed vTZOPGRPO = 0; else SetNameForView( vTZOPGRPO, "TZOPSIGK.Interp", lpInterpSubtask, zLEVEL_TASK ); } g_nStackPtr = 0; g_nCallStack[ 0 ] = 1; return( 0 ); }
zOPER_EXPORT zSHORT OPERATION zwTZCMRPTD_RefreshSelComponents( zVIEW vSubtask ) { zVIEW vTZCMLPLO; zVIEW vTZCMRPTO; zVIEW vCompList; zVIEW vTZCMRPTO_New; zCHAR szName[ 33 ]; zCHAR szERR_Msg[ 254 ]; SetNameForView( vSubtask,"TZCM_ChkInWindow", vSubtask, zLEVEL_TASK ); GetViewByName( &vTZCMRPTO, "TZCMRPTO", vSubtask, zLEVEL_TASK ); if ( SetCursorFirstSelectedEntity( vTZCMRPTO, "ReportLine", "" ) < zCURSOR_SET ) { zstrcpy( szERR_Msg, "No Component selected to Refresh." ); MessageSend( vSubtask, "CM00241", "Configuration Management", szERR_Msg, zMSGQ_OBJECT_CONSTRAINT_WARNING, zBEEP ); return( 0 ); } if ( zwTZCMLPLD_OptionRefreshFromRepo( vSubtask, &vTZCMLPLO, szName, zRefreshUserDefined ) < 0 ) { return( -1 ); } GetViewByName( &vTZCMRPTO_New, "TZCMRPTO_New", vSubtask, zLEVEL_TASK ); // if component refreshed? if ( CompareAttributeToInteger( vTZCMRPTO_New, "CPLR", "ComponentRefreshed", 1 ) == 0 ) { zstrcpy( szERR_Msg, "Project '" ); GetStringFromAttribute( &szERR_Msg[ zstrlen( szERR_Msg ) ], vTZCMLPLO, "LPLR", "Name" ); zstrcat( szERR_Msg, "' has been successfully refreshed \nfrom CPLR '" ); zstrcat( szERR_Msg, szName ); zstrcat( szERR_Msg, "'." ); MessageSend( vSubtask, "CM00279", "Configuration Management", szERR_Msg, zMSGQ_OBJECT_CONSTRAINT_INFORMATION, zBEEP ); } if ( GetViewByName( &vTZCMRPTO, "TZCMRPTO", vSubtask, zLEVEL_TASK ) > 0 ) DropObjectInstance( vTZCMRPTO ); // Build new Refresh List if ( zwTZCMLPLD_RefreshUserDefined( vSubtask ) < 1 ) return( -1 ); RefreshWindow( vSubtask ); if ( GetViewByName( &vCompList, "CompList", vSubtask, zLEVEL_TASK ) >= 0 ) RefreshWindow( vCompList ); return( 0 ); } // zwTZCMRPTD_RefreshSelComponents
zOPER_EXPORT zSHORT OPERATION zwTZVSDBAD_Resume( zVIEW vSubtask ) { zVIEW vAppSubtask; zVIEW lpZeidonVML; zSHORT nZRetCode; nZRetCode = GetViewByName( &lpZeidonVML, "ZeidonVML", vSubtask, zLEVEL_TASK ); nZRetCode = GetViewByName( &vAppSubtask, "ApplicationView", lpZeidonVML, zLEVEL_SUBTASK ); nZRetCode = Exec_ResumeFromDebugger( vSubtask, "", vAppSubtask ); return( 0 ); }
zOPER_EXPORT zLONG OPERATION GetExecModeByZKey( zVIEW lpInterpSubtask, zVIEW lpAppSubtask, zLONG lZKey ) { zVIEW vXChecker; zVIEW CM_List; zCHAR szExecDir[ zMAX_FILESPEC_LTH + 1 ]; zSHORT nRC; nRC = GetViewByName( &vXChecker, "TZVSXCOO", lpInterpSubtask, zLEVEL_APPLICATION ); if ( nRC != zLEVEL_APPLICATION ) { nRC = GetViewByName( &CM_List, "TZCMWKSO", lpInterpSubtask, zLEVEL_APPLICATION ); nRC = GetStringFromAttribute( szExecDir, zsizeof( szExecDir ), CM_List, "LPLR", "ExecDir" ); ZeidonStringConcat( szExecDir, 1, 0, "\\TZVSXC01.POR", 1, 0, zMAX_FILESPEC_LTH + 1 ); nRC = ActivateOI_FromFile( &vXChecker, "TZVSXCOO", lpAppSubtask, szExecDir, zSINGLE | zIGNORE_ATTRIB_ERRORS ); if ( nRC != 0 ) return( -1 ); } nRC = SetCursorFirstEntityByInteger( vXChecker, "DialogOperation", "ZKey", lZKey, "APPLICATION" ); #if 0 if ( nRC != zCURSOR_SET ) return( -1 ); #else if ( nRC < zCURSOR_SET ) nRC = SetCursorFirstEntityByInteger( vXChecker, "LOD_Operation", "ZKey", lZKey, "APPLICATION" ); if ( nRC < zCURSOR_SET ) nRC = SetCursorFirstEntityByInteger( vXChecker, "Operation", "ZKey", lZKey, "APPLICATION" ); // why do this??? if ( nRC < zCURSOR_SET ) return( -1 ); #endif if ( nRC >= zCURSOR_SET ) { nRC = SetAttributeFromInteger( vXChecker, "APPLICATION", "CurrentMode", zXC_SETUP_DEBUGGER ); return( zXC_SETUP_DEBUGGER ); } else { nRC = SetAttributeFromInteger( vXChecker, "APPLICATION", "CurrentMode", 1 ); return( zXC_OPERATION_STAGED ); } }
void fnMapCtrlsFromOI( ZMapAct *pzma, WPARAM wParam, LPARAM lParam ) { #ifdef DEBUG_ALL TraceLineS( "MapCtrlsFromOI: ", *(pzma->m_pzsTag) ); if ( zstrcmp( *(pzma->m_pzsTag), "Text42" ) == 0 ) TraceLineS( "Before MapCtrlsFromOI: ", *(pzma->m_pzsTag) ); #endif // Map all except the one(s) specified (if any). if ( pzma && (lParam == 0 || fnFindCtrlInList( pzma, (zCPCHAR) lParam ) == FALSE) ) { #ifdef DEBUG_ALL if ( zstrcmp( *(pzma->m_pZSubtask->m_pzsWndTag), "Invoice" ) == 0 && pzma->m_pzsAName && pzma->m_pzsEName ) { zVIEW vApp; GetViewByName( &vApp, "mInvO", pzma->m_pZSubtask->m_vDialog, zLEVEL_ANY ); // GetViewByName( &vApp, *(pzma->m_pzsVName), // pzma->m_pZSubtask->m_vDialog, zLEVEL_ANY ); if ( vApp ) { DisplayEntityInstance( vApp, "ReceiptApplied" ); // DisplayEntityInstance( vApp, *(pzma->m_pzsEName) ); } } #endif pzma->MapFromOI( wParam ); #ifdef DEBUG_ALL // if ( zstrcmp( *(pzma->m_pzsTag), "Text42" ) == 0 || // zstrcmp( *(pzma->m_pzsTag), "Text44" ) == 0 ) if ( zstrcmp( *(pzma->m_pZSubtask->m_pzsWndTag), "Invoice" ) == 0 && pzma->m_pzsAName && pzma->m_pzsEName ) { zVIEW vApp; TraceLineS( "After MapCtrlsFromOI: ", *(pzma->m_pzsTag) ); GetViewByName( &vApp, "mInvO", pzma->m_pZSubtask->m_vDialog, zLEVEL_ANY ); if ( vApp ) DisplayEntityInstance( vApp, "ReceiptApplied" ); } #endif } }
zOPER_EXPORT zSHORT OPERATION zwTZCMRPTD_CloseRefresh( zVIEW vSubtask ) { zVIEW vView; if ( GetViewByName( &vView, "TZCMRPTO", vSubtask, zLEVEL_TASK ) > 0 ) DropObjectInstance( vView ); if ( GetViewByName( &vView, "TZCMRPTO_New", vSubtask, zLEVEL_TASK ) > 0 ) DropObjectInstance( vView ); return( 0 ); } // zwTZCMRPTD_CloseRefresh
zOPER_EXPORT zSHORT OPERATION zwTZVSDBAD_BuildVar( zVIEW vSubtask ) { zVIEW vStackObject; zVIEW lpZeidonVML; zSHORT nZRetCode; nZRetCode = GetViewByName( &lpZeidonVML, "ZeidonVML", vSubtask, zLEVEL_TASK ); nZRetCode = GetViewByName( &vStackObject, "StackObject", lpZeidonVML, zLEVEL_SUBTASK ); nZRetCode = SetNameForView( vStackObject, "StackObject", vSubtask, zLEVEL_SUBTASK ); nZRetCode = CreateTemporalSubobjectVersion( vStackObject, "Variable" ); return( 0 ); }
zOPER_EXPORT zSHORT OPERATION zwTZVSDBAD_PostInitDebugger( zVIEW vSubtask ) { zVIEW XPG; zVIEW vStatementView; zSHORT nZRetCode; zSHORT RESULT; zLONG lTempInteger_0; nZRetCode = GetViewByName( &XPG, "XPG", vSubtask, zLEVEL_SUBTASK ); nZRetCode = GetViewByName( &vStatementView, "StatementView", vSubtask, zLEVEL_SUBTASK ); nZRetCode = GetIntegerFromAttribute( &lTempInteger_0, vStatementView, "Statement", "RelativeLineNumber" ); RESULT = SetCursorFirstEntityByInteger( XPG, "OperationText", "RelativeLineNumber", lTempInteger_0, "" ); return( 0 ); }
///////////////////////////////////////////////////////////////////////////// // // OPERATION: zwTZCMRPTD_DropViewForAudittrail // // ///////////////////////////////////////////////////////////////////////////// zOPER_EXPORT zSHORT /*DIALOG */ OPERATION zwTZCMRPTD_DropViewForAudittrail( zVIEW vSubtask ) { zVIEW vTZBRAUDO; if ( GetViewByName( &vTZBRAUDO, "TZBRAUDO", vSubtask, zLEVEL_TASK ) > 0 ) DropObjectInstance( vTZBRAUDO ); if ( GetViewByName( &vTZBRAUDO, "TZBRAU2O", vSubtask, zLEVEL_TASK ) > 0 ) DropObjectInstance( vTZBRAUDO ); if ( GetViewByName( &vTZBRAUDO, "TZBRAU3O", vSubtask, zLEVEL_TASK ) > 0 ) DropObjectInstance( vTZBRAUDO ); return( 0 ); } // zwTZCMRPTD_DropViewForAudittrail
///////////////////////////////////////////////////////////////////////////// // // OPERATION: SironCreateDataModel // // ///////////////////////////////////////////////////////////////////////////// zOPER_EXPORT zSHORT /*GLOBAL */ OPERATION SironCreateDataModel( zVIEW vSubtask, zPVIEW pvERD ) { zVIEW vERD_Window; zVIEW vTaskLPLR; GetViewByName( &vTaskLPLR, "TaskLPLR", vSubtask, zLEVEL_TASK ); ActivateEmptyMetaOI( vSubtask, pvERD, zSOURCE_ERD_META, zSINGLE | zLEVEL_APPLICATION ); // Build Root Instance CreateMetaEntity( vSubtask, *pvERD, "EntpER_Model", zPOS_AFTER ); SetAttributeFromAttribute( *pvERD, "EntpER_Model", "Name", vTaskLPLR, "LPLR", "Name" ); SetAttributeFromString( *pvERD, "EntpER_Model", "Desc", "Siron Catalogs DataModel" ); SetNameForView( *pvERD, "TZEREMDO", vSubtask, zLEVEL_TASK ); // Data Model exists, enable ERD Control GetParentWindow( &vERD_Window, vSubtask ); SetCtrlState( vERD_Window, "ERD", zCONTROL_STATUS_ENABLED, TRUE ); // Set window Title with check out state SetTitleWithCheckOutState( vERD_Window, "Data Model", "TZEREMDO", *pvERD, "EntpER_Model", zSOURCE_ERD_META ); return( 0 ); } // SironCreateDataModel
//./ ADD NAME=oTZCMQSYO_ActivateREPO_Enqueue // Source Module=tzcmrepo.c //////////////////////////////////////////////// // // OPERATION: oTZCMQSYO_ActivateREPO_Enqueue // // PURPOSE: Checks for REPOS_Enqueue via the SystemAdmin. // // PARAMETERS: vTZCMREPO - A pointer to the return Repository Enqueue view // vSubtask - A qualifying view for the Activation // // RETURNS: >= 0 - TZCMREPO activated successfully // -1 - Error encountered during activation // //////////////////////////////////////////////// //./ END + 2 zOPER_EXPORT zSHORT OPERATION oTZCMQSYO_ActivateREPO_Enqueue( zPVIEW vTZCMQSYO, zVIEW vSubtask ) { zVIEW vKZDBHQUA; zSHORT nRC; if ( GetViewByName( &vKZDBHQUA, "KZDBHQUA", vSubtask, zLEVEL_TASK ) < 0 ) { if ( ActivateEmptyObjectInstance( &vKZDBHQUA, "KZDBHQUA", vSubtask, zSINGLE ) >= 0 ) { SetNameForView( vKZDBHQUA, "KZDBHQUA", vSubtask, zLEVEL_TASK ); CreateEntity( vKZDBHQUA, "EntitySpec", zPOS_AFTER ); CreateEntity( vKZDBHQUA, "QualAttrib", zPOS_AFTER ); } else return( -1 ); } SetAttributeFromString( vKZDBHQUA, "EntitySpec", "EntityName", "SysEnqueue" ); SetAttributeFromString( vKZDBHQUA, "QualAttrib", "EntityName", "SysEnqueue" ); SetAttributeFromString( vKZDBHQUA, "QualAttrib", "AttributeName", "TimeStamp" ); SetAttributeFromString( vKZDBHQUA, "QualAttrib", "Oper", ">" ); SetAttributeFromString( vKZDBHQUA, "QualAttrib", "Value", "19000101000000000" ); nRC = ActivateObjectInstance( vTZCMQSYO, "TZCMQSYO", vSubtask, vKZDBHQUA, zLEVEL_TASK | zMULTIPLE ); DropObjectInstance( vKZDBHQUA ); return( nRC ); }
/* The user selected a LOD in the Object list. Load the LOD meta and copy all object operations to the editor work object. */ zOPER_EXPORT zSHORT OPERATION ObjList_AddObjOpersToWorkList( zVIEW vSubtask ) { zVIEW vObjList; zVIEW vLOD; zVIEW vEdWrk; zSHORT nRC; zSHORT nLth; zCHAR szOpName[ 255 ]; GetWorkView( &vEdWrk ); GetViewByName( &vObjList, "TZEDCWZD_TZCMLPLO_List", vSubtask, zLEVEL_TASK ); ActivateMetaOI( vSubtask, &vLOD, vObjList, zREFER_LOD_META, 0 ); GetStringFromAttribute( szOpName, vObjList, "W_MetaDef", "Name" ); zstrcat( szOpName, "." ); nLth = zstrlen( szOpName ); for ( nRC = SetCursorFirstEntity( vLOD, "OperationList", 0 ); nRC == zCURSOR_SET; nRC = SetCursorNextEntity( vLOD, "OperationList", 0 ) ) { GetStringFromAttribute( &szOpName[ nLth ], vLOD, "OperationList", "Name" ); CreateEntity( vEdWrk, "Oper", zPOS_LAST ); SetAttributeFromString( vEdWrk, "Oper", "Name", szOpName ); } DropMetaOI( vSubtask, vLOD ); DropView( vObjList ); return( 0 ); } // ObjList_AddObjOpersToWorkList
//: VIEW TZZOLODO REGISTERED AS TZZOLODO zOPER_EXPORT zSHORT OPERATION CopyEntityGroupMappingStart( zVIEW vSubtask ) { zVIEW TZZOLODO = 0; zSHORT RESULT; //:STRING ( 100 ) MappingName zCHAR MappingName[ 101 ] = { 0 }; zSHORT lTempInteger_0; zCHAR szTempString_0[ 33 ]; RESULT = GetViewByName( &TZZOLODO, "TZZOLODO", vSubtask, zLEVEL_TASK ); //:// Copy the mapping name of the attribute to the clip board. //:IF TZZOLODO.LOD_Entity EXISTS lTempInteger_0 = CheckExistenceOfEntity( TZZOLODO, "LOD_Entity" ); if ( lTempInteger_0 == 0 ) { //:MappingName = "[Z:#S:" + //: TZZOLODO.LOD_Entity.Name + "]" GetVariableFromAttribute( szTempString_0, 0, 'S', 33, TZZOLODO, "LOD_Entity", "Name", "", 0 ); ZeidonStringCopy( MappingName, 1, 0, "[Z:#S:", 1, 0, 101 ); ZeidonStringConcat( MappingName, 1, 0, szTempString_0, 1, 0, 101 ); ZeidonStringConcat( MappingName, 1, 0, "]", 1, 0, 101 ); //:SetClipboardBlob( MappingName, 0, 0 ) SetClipboardBlob( MappingName, 0, 0 ); } //:END return( 0 ); // END }
///////////////////////////////////////////////////////////////////////////// // // ENTRY: // // PURPOSE: Set the VKey Ctrl/Alt/Shift check boxes // ///////////////////////////////////////////////////////////////////////////// zOPER_EXPORT zSHORT OPERATION PostBSetVKey( zVIEW vSubtask ) { zULONG ulLth = sizeof( zACCEL_DEF ); zVIEW vHotkey; zACCEL_DEF ac; GetViewByName( &vHotkey, "KZHKEYSO", vSubtask, zLEVEL_ANY ); if ( vHotkey && CheckExistenceOfEntity( vHotkey, "Hotkey" ) > zCURSOR_UNCHANGED ) { GetBlobFromAttribute( &ac, &ulLth, vHotkey, "Hotkey", "KeyCombo" ); SetCtrlState( vSubtask, "Ctrl", zCONTROL_STATUS_CHECKED, ac.fCtrl ); SetCtrlState( vSubtask, "Alt", zCONTROL_STATUS_CHECKED, ac.fAlt ); SetCtrlState( vSubtask, "Shift", zCONTROL_STATUS_CHECKED, ac.fShift ); // if ( CheckExistenceOfEntity( vHotkey, "Operation" ) > zCURSOR_UNCHANGED ) // { // zPCHAR pch; // // GetAddrForAttribute( &pch, vHotkey, "Operation", "DLL_Name" ); // SetCtrlText( vSubtask, "DLL_Name", pch ); // } } return( 0 ); }
///////////////////////////////////////////////////////////////////////////// // // ENTRY: // // PURPOSE: // ///////////////////////////////////////////////////////////////////////////// zOPER_EXPORT zSHORT OPERATION zwTZHKEYAD_ExitAppl( zVIEW vSubtask ) { zVIEW vKZHKEYSO; zSHORT nRC; // Get Access to current HK Object and prompt for Save. nRC = GetViewByName( &vKZHKEYSO, "KZHKEYSO", vSubtask, zLEVEL_ANY ); if ( nRC > 0 && ObjectInstanceUpdatedFromFile( vKZHKEYSO ) == 1 ) { zCHAR szMsg[ 300 ]; zstrcpy( szMsg, "Do you wish to save current Application Hotkeys?" ); nRC = MessagePrompt( vSubtask, "HK00104", "Hot Keys", szMsg, zBEEP, zBUTTONS_YESNOCANCEL, zRESPONSE_NO, 0 ); if ( nRC == zRESPONSE_CANCEL ) { SetWindowActionBehavior( vSubtask, zWAB_ReturnToTopWindow, "TZHKEYAD", "Application" ); return( 0 ); } else { if ( nRC == zRESPONSE_YES ) zwTZHKEYAD_SaveHK_ForLPLR( vSubtask ); } } //xTerminateLPLR( vSubtask ); return( 0 ); }
//: VIEW TZZOLODO REGISTERED AS TZZOLODO zOPER_EXPORT zSHORT OPERATION CopyEntityGroupEnd( zVIEW vSubtask ) { zVIEW TZZOLODO = 0; zSHORT RESULT; //:STRING ( 100 ) MappingName zCHAR MappingName[ 101 ] = { 0 }; zSHORT lTempInteger_0; RESULT = GetViewByName( &TZZOLODO, "TZZOLODO", vSubtask, zLEVEL_TASK ); //:// Copy the mapping name of the attribute to the clip board. //:IF TZZOLODO.LOD_Entity EXISTS lTempInteger_0 = CheckExistenceOfEntity( TZZOLODO, "LOD_Entity" ); if ( lTempInteger_0 == 0 ) { //:MappingName = "[Z:#E]" ZeidonStringCopy( MappingName, 1, 0, "[Z:#E]", 1, 0, 101 ); //:SetClipboardBlob( MappingName, 0, 0 ) SetClipboardBlob( MappingName, 0, 0 ); } //:END return( 0 ); // END }
// Function to process the controls in order for mapping to the OI. void fnMapCtrlsToOI( ZMapAct *pzma, WPARAM wParam, LPARAM lParam ) { #if 0 //def DEBUG_ALL lots of messages if ( pzma ) { TraceLineS( "Map to OI from control: ", *(pzma->m_pzsTag) ); if ( zstrcmp( *(pzma->m_pZSubtask->m_pzsWndTag), "Invoice" ) == 0 && pzma->m_pzsAName && pzma->m_pzsEName ) { zVIEW vApp; GetViewByName( &vApp, "mInvO", pzma->m_pZSubtask->m_vDialog, zLEVEL_ANY ); // GetViewByName( &vApp, *(pzma->m_pzsVName), // pzma->m_pZSubtask->m_vDialog, zLEVEL_ANY ); if ( vApp ) { DisplayEntityInstance( vApp, "ReceiptApplied" ); // DisplayEntityInstance( vApp, *(pzma->m_pzsEName) ); } } } #endif // This code lets only one mapping error occur per iteration. if ( pzma && pzma->m_pZSubtask->m_pZMIXCtrl->m_pvNodeErr == 0 && pzma->MapToOI( ) < 0 ) { pzma->SetZCtrlState( zCONTROL_STATUS_ERROR, TRUE ); pzma->m_pZSubtask->m_pZMIXCtrl->m_pvNodeErr = (zPVOID) pzma; } }
///////////////////////////////////////////////////////////////////////////// // // ENTRY: // // PURPOSE: Save the VKey Ctrl/Alt/Shift based on the check box settings // ///////////////////////////////////////////////////////////////////////////// zOPER_EXPORT zSHORT OPERATION SaveVKey( zVIEW vSubtask ) { zVIEW vHotkey; zACCEL_DEF ac; zLONG lVKey; zmemset( &ac, 0, sizeof( zACCEL_DEF ) ); GetViewByName( &vHotkey, "KZHKEYSO", vSubtask, zLEVEL_ANY ); GetIntegerFromAttribute( &lVKey, vHotkey, "Hotkey", "VKey" ); ac.uVK = (zUSHORT) lVKey; ac.fCtrl = (zUSHORT) GetCtrlState( vSubtask, "Ctrl", zCONTROL_STATUS_CHECKED ); ac.fAlt = (zUSHORT) GetCtrlState( vSubtask, "Alt", zCONTROL_STATUS_CHECKED ); ac.fShift = (zUSHORT) GetCtrlState( vSubtask, "Shift", zCONTROL_STATUS_CHECKED ); SetAttributeFromBlob( vHotkey, "Hotkey", "KeyCombo", &ac, sizeof( zACCEL_DEF ) ); // if ( CheckExistenceOfEntity( vHotkey, "Operation" ) > zCURSOR_UNCHANGED ) // { // zCHAR szText[ 64 ]; // // GetCtrlText( vSubtask, "DLL_Name", szText, sizeof( szText ) ); // SetAttributeFromString( vHotkey, "Operation", "DLL_Name", 0 ); // } return( 0 ); }
///////////////////////////////////////////////////////////////////////////// // // OPERATION: zwTZERRORD_SetTitle // // ///////////////////////////////////////////////////////////////////////////// zOPER_EXPORT zSHORT /*LOCAAL */ OPERATION zwTZERRORD_SetTitle( zVIEW vSubtask ) { zVIEW vTZERROR; zCHAR szTitle[ 100 ]; zCHAR szColumnName[50]; zLONG lType; if ( GetViewByName( &vTZERROR, "TZERROR", vSubtask, zLEVEL_TASK ) < 0 ) return( -1 ); GetIntegerFromAttribute( &lType, vTZERROR, "ErrorList", "MetaType" ); if ( lType == zSOURCE_ERD_META ) { zstrcpy( szTitle, "Data Model Error List" ); zstrcpy( szColumnName, "Entity" ); } else if ( lType == zSOURCE_REPLACE_BMP ) { zstrcpy( szTitle, "Bitmap Error List" ); zstrcpy( szColumnName, "Dialog" ); } else { zstrcpy( szTitle, "" ); zstrcpy( szColumnName, "" ); } SetCtrlRowColText( vSubtask, "lbErrorList", 0, 1, szColumnName ); SetWindowCaptionTitle( vSubtask, szTitle, "" ); return( 0 ); } // zwTZERRORD_SetTitle
// Get the data from the OI and map it to the entry control. zSHORT ZMLE::MapFromOI( WPARAM wFlag ) { #ifdef DEBUG_ALL TraceLineS( "ZMLE::MapFromOI: ", *m_pzsTag ); #endif if ( m_pzsVName && m_pzsEName && m_pzsAName ) { zVIEW vApp = 0; if ( GetViewByName( &vApp, *m_pzsVName, m_pZSubtask->m_vDialog, zLEVEL_ANY ) > 0 ) { if ( m_ulLth == 0 ) { GetAttributeDisplayLength( &m_ulLth, vApp, *m_pzsEName, *m_pzsAName, *m_pzsContext ); LimitTextLength( (zSHORT) m_ulLth ); } } // if ( zstrcmp( *m_pzsTag, "MLEdit7" ) == 0 ) // DisplayEntityInstance( vApp, *m_pzsEName ); } return( ZMapAct::MapFromOI( ) ); }
zOPER_EXPORT zSHORT OPERATION zwTZVSDBAD_InitDebugger( zVIEW vSubtask ) { zVIEW vXPGView; zVIEW vXPG; zVIEW vZeidonStatementView; zVIEW lpZeidonVML; zSHORT nZRetCode; nZRetCode = GetViewByName( &lpZeidonVML, "ZeidonVML", vSubtask, zLEVEL_TASK ); nZRetCode = GetViewByName( &vXPGView, "XPG", lpZeidonVML, zLEVEL_SUBTASK ); nZRetCode = SetNameForView( vXPGView, "XPG", vSubtask, zLEVEL_SUBTASK ); nZRetCode = GetViewByName( &vZeidonStatementView, "StatementView", lpZeidonVML, zLEVEL_SUBTASK ); nZRetCode = SetNameForView( vZeidonStatementView, "StatementView", vSubtask, zLEVEL_SUBTASK ); nZRetCode = GetViewByName( &vXPG, "StackObject", lpZeidonVML, zLEVEL_SUBTASK ); nZRetCode = SetNameForView( vXPG, "StackObject", vSubtask, zLEVEL_SUBTASK ); return( 0 ); }
///////////////////////////////////////////////////////////////////////////// // // OPERATION: zwTZZMAIND_Postbuild // // PURPOSE: // ///////////////////////////////////////////////////////////////////////////// zOPER_EXPORT zSHORT OPERATION zwTZZMAIND_PostBuild( zVIEW vSubtask ) { zSHORT nRC; zCHAR szLPL_Name[ 34 ]; zVIEW vLPL; zVIEW vMetaList; InitializeLPLR( vSubtask, "" ); nRC = GetViewByName( &vLPL, "TaskLPLR", vSubtask, zLEVEL_TASK ); if ( nRC > 0 ) { GetStringFromAttribute( szLPL_Name, vLPL, "LPLR", "Name" ); SetWindowCaptionTitle( vSubtask, 0, szLPL_Name ); } // Get view to all list types RetrieveViewForMetaList( vSubtask, &vMetaList, zSOURCE_SA_META ); SetNameForView( vMetaList, "TZERDS", vSubtask, zLEVEL_TASK ); RetrieveViewForMetaList( vSubtask, &vMetaList, zREFER_SA_META ); SetNameForView( vMetaList, "TZERDR", vSubtask, zLEVEL_TASK ); RetrieveViewForMetaList( vSubtask, &vMetaList, zSOURCE_DOMAIN_META ); SetNameForView( vMetaList, "TZDMNS", vSubtask, zLEVEL_TASK ); RetrieveViewForMetaList( vSubtask, &vMetaList, zREFER_DOMAIN_META ); SetNameForView( vMetaList, "TZDMNR", vSubtask, zLEVEL_TASK ); RetrieveViewForMetaList( vSubtask, &vMetaList, zSOURCE_DTE_META ); SetNameForView( vMetaList, "TZDBMS", vSubtask, zLEVEL_TASK ); RetrieveViewForMetaList( vSubtask, &vMetaList, zREFER_DTE_META ); SetNameForView( vMetaList, "TZDBMR", vSubtask, zLEVEL_TASK ); RetrieveViewForMetaList( vSubtask, &vMetaList, zSOURCE_LOD_META ); SetNameForView( vMetaList, "TZLODS", vSubtask, zLEVEL_TASK ); RetrieveViewForMetaList( vSubtask, &vMetaList, zREFER_LOD_META ); SetNameForView( vMetaList, "TZLODR", vSubtask, zLEVEL_TASK ); RetrieveViewForMetaList( vSubtask, &vMetaList, zSOURCE_DIALOG_META ); SetNameForView( vMetaList, "TZDLGS", vSubtask, zLEVEL_TASK ); RetrieveViewForMetaList( vSubtask, &vMetaList, zREFER_DIALOG_META ); SetNameForView( vMetaList, "TZDLGR", vSubtask, zLEVEL_TASK ); RetrieveViewForMetaList( vSubtask, &vMetaList, zSOURCE_PENV_META ); SetNameForView( vMetaList, "TZPENS", vSubtask, zLEVEL_TASK ); RetrieveViewForMetaList( vSubtask, &vMetaList, zREFER_PENV_META ); SetNameForView( vMetaList, "TZPENR", vSubtask, zLEVEL_TASK ); RetrieveViewForMetaList( vSubtask, &vMetaList, zSOURCE_GO_META ); SetNameForView( vMetaList, "TZOPRS", vSubtask, zLEVEL_TASK ); RetrieveViewForMetaList( vSubtask, &vMetaList, zREFER_GO_META ); SetNameForView( vMetaList, "TZOPRR", vSubtask, zLEVEL_TASK ); MB_SetMessage( vSubtask, 1, "?" ); MB_SetMessage( vSubtask, 2, "*" ); return( 0 ); }
///////////////////////////////////////////////////////////////////////////// // // OPERATION: zwTZZMAIND_ToolAboutExit // // PURPOSE: Drop the About Porifle View on exit from window // ///////////////////////////////////////////////////////////////////////////// zOPER_EXPORT zSHORT OPERATION zwTZZMAIND_ToolAboutExit( zVIEW vSubtask ) { zVIEW vAbout; GetViewByName( &vAbout, "ToolAbout", vSubtask, zLEVEL_TASK); DropView( vAbout ); return( 0 ); }
zOPER_EXPORT zSHORT OPERATION SortMetaListByDate ( zVIEW vSubtask ) { zVIEW vMetaList; GetViewByName( &vMetaList, "TZEDCWZD_TZCMLPLO_List", vSubtask, zLEVEL_TASK ); OrderEntityForView( vMetaList, "W_MetaDef", "LastUpdateDate D" ); return( 0 ); }
///////////////////////////////////////////////////////////////////////////// // // OPERATION: zwTZERRORD_SetCountError // // ///////////////////////////////////////////////////////////////////////////// zOPER_EXPORT zSHORT /*DIALOG */ OPERATION zwTZERRORD_SetCountError( zVIEW vSubtask ) { zVIEW vTZERROR; zLONG lCountError; zLONG lCountWarning; zSHORT nRC; zCHAR szCount[ 10 ]; zCHAR szControlText[ 100 ]; if ( GetViewByName( &vTZERROR, "TZERROR", vSubtask, zLEVEL_TASK ) < 0 ) return( -1 ); if ( CheckExistenceOfEntity( vTZERROR, "ErrorList" ) >= zCURSOR_SET ) { // Set Count Errors to Textfield lCountError = 0; lCountWarning = 0; for ( nRC = SetCursorFirstEntity( vTZERROR, "ErrorMsg", "" ); nRC >= zCURSOR_SET; nRC = SetCursorNextEntity( vTZERROR, "ErrorMsg", "" ) ) { if ( CompareAttributeToInteger( vTZERROR, "ErrorMsg", "Error", 1 ) == 0 ) lCountError++; else lCountWarning++; } zltoa( lCountError, szCount ); zstrcpy( szControlText, " " ); zstrcat( szControlText, szCount ); zstrcat( szControlText, " Error(s) " ); if ( lCountWarning > 0 ) { zltoa( lCountWarning, szCount ); zstrcat( szControlText, ", " ); zstrcat( szControlText, szCount ); zstrcat( szControlText, " Warning(s) " ); } zstrcat( szControlText, "found" ); } else { zstrcpy( szControlText, " No Errors" ); } SetCtrlText( vSubtask, "txtCountError", szControlText ); return( 0 ); } // zwTZERRORD_SetCountError