Exemple #1
0
//根据monitorid获取父设备的名称
string  GetDeviceTitle(string strId)
{
	string strTmp = "";
	string strParentId = FindParentID(strId);

	//设备名称
	OBJECT objDevice = GetEntity(strParentId);
    if(objDevice != INVALID_VALUE)
    {
        MAPNODE devicenode = GetEntityMainAttribNode(objDevice);
        if(devicenode != INVALID_VALUE)
        {
			FindNodeValue(devicenode, "sv_name", strTmp);
		}
		
		CloseEntity(objDevice);
	}

	return strTmp;
}
Exemple #2
0
void CCheckBoxTreeView::PushGroup(std::string strUserGroupRight, vector<string>& pUserRightVec )
{
    //bool bFirst= true;
    std::string  strParent= strUserGroupRight;
    vector<string> ::iterator plistitem;
    while(!IsSVSEID(strParent))
    {

        plistitem= find(pUserRightVec.begin(),pUserRightVec.end(),strParent);
        if(plistitem==pUserRightVec.end())
            pUserRightVec.push_back(strParent);
        strParent= FindParentID(strParent);

    }
    plistitem= find(pUserRightVec.begin(),pUserRightVec.end(),strParent);
    if(plistitem==pUserRightVec.end())
        pUserRightVec.push_back(strParent);


}