LONG CuDlgDomPropIceSecRole::OnUpdateData (WPARAM wParam, LPARAM lParam) { // cast received parameters int nNodeHandle = (int)wParam; LPIPMUPDATEPARAMS pUps = (LPIPMUPDATEPARAMS)lParam; ASSERT (nNodeHandle != -1); ASSERT (pUps); // ignore selected actions on filters switch (pUps->nIpmHint) { case 0: //case FILTER_DOM_SYSTEMOBJECTS: //case FILTER_DOM_BASEOWNER: //case FILTER_DOM_OTHEROWNER: break; case FILTER_DOM_BKREFRESH_DETAIL: if (m_Data.m_refreshParams.MustRefresh(pUps->pSFilter->bOnLoad, pUps->pSFilter->refreshtime)) break; // need to update else return 0; // no need to update break; default: return 0L; // nothing to change on the display } LPTREERECORD lpRecord = (LPTREERECORD)pUps->pStruct; ASSERT (lpRecord); ResetDisplay(); // double check type int objType = lpRecord->recType; ASSERT (objType == OT_ICE_BUNIT_SEC_ROLE); // Get Info ICEBUSUNITROLEDATA iceStruct; memset (&iceStruct, 0, sizeof(iceStruct)); x_strcpy((LPSTR)iceStruct.icerole.RoleName, (LPCSTR)lpRecord->objName); x_strcpy((LPSTR)iceStruct.icebusunit.Name, (LPCSTR)lpRecord->extra); int iResult = GetICEInfo ((LPUCHAR)GetVirtNodeName(nNodeHandle), objType, &iceStruct); if (iResult != RES_SUCCESS) { ASSERT (FALSE); // Reset m_Data CuDomPropDataIceSecRole tempData; tempData.m_refreshParams = m_Data.m_refreshParams; m_Data = tempData; // Refresh display RefreshDisplay(); return 0L; } // Update refresh info m_Data.m_refreshParams.UpdateRefreshParams(); // // update member variables, for display/load/save purpose // m_Data.m_bExecDoc = iceStruct.bExecDoc; m_Data.m_bCreateDoc = iceStruct.bCreateDoc; m_Data.m_bReadDoc = iceStruct.bReadDoc; // Refresh display RefreshDisplay(); return 0L; }
LONG CuDlgDomPropIceDbconnection::OnUpdateData (WPARAM wParam, LPARAM lParam) { // cast received parameters int nNodeHandle = (int)wParam; LPIPMUPDATEPARAMS pUps = (LPIPMUPDATEPARAMS)lParam; ASSERT (nNodeHandle != -1); ASSERT (pUps); // ignore selected actions on filters switch (pUps->nIpmHint) { case 0: //case FILTER_DOM_SYSTEMOBJECTS: //case FILTER_DOM_BASEOWNER: //case FILTER_DOM_OTHEROWNER: break; case FILTER_DOM_BKREFRESH_DETAIL: if (m_Data.m_refreshParams.MustRefresh(pUps->pSFilter->bOnLoad, pUps->pSFilter->refreshtime)) break; // need to update else return 0; // no need to update break; default: return 0L; // nothing to change on the display } ResetDisplay(); // Get info on the object DBCONNECTIONDATA IceDbconnectionParams; memset (&IceDbconnectionParams, 0, sizeof (IceDbconnectionParams)); LPTREERECORD lpRecord = (LPTREERECORD)pUps->pStruct; ASSERT (lpRecord); // // Get ICE Detail Info // int objType = lpRecord->recType; ASSERT (objType == OT_ICE_DBCONNECTION || objType == OT_ICE_WEBUSER_CONNECTION || objType == OT_ICE_PROFILE_CONNECTION); lstrcpy ((LPTSTR)IceDbconnectionParams.ConnectionName, (LPCTSTR)lpRecord->objName); int iResult = GetICEInfo ((LPUCHAR)GetVirtNodeName(nNodeHandle), OT_ICE_DBCONNECTION, &IceDbconnectionParams); if (iResult != RES_SUCCESS) { ASSERT (FALSE); // Reset m_Data CuDomPropDataIceDbconnection tempData; tempData.m_refreshParams = m_Data.m_refreshParams; m_Data = tempData; // Refresh display RefreshDisplay(); return 0L; } // Update refresh info m_Data.m_refreshParams.UpdateRefreshParams(); // update member variables, for display/load/save purpose m_Data.m_csDBName = IceDbconnectionParams.DBName; m_Data.m_csDBUser = IceDbconnectionParams.DBUsr.UserAlias; m_Data.m_csComment = IceDbconnectionParams.Comment; // Refresh display RefreshDisplay(); return 0L; }