Exemplo n.º 1
0
bool CWizDatabase::getUserGroupInfo(CWizGroupDataArray& arrayGroup)
{
    CString strTotal;
    bool bExist;

    if (!GetMeta(g_strGroupSection, "Count", strTotal, "", &bExist)) {
        return false;
    }

    if (!bExist) {
        return false;
    }

    int nTotal = strTotal.toInt();
    for (int i = 0; i < nTotal; i++) {
        QString strGroupGUID = GetMetaDef(g_strGroupSection, QString::number(i));
        QString strGroupName = GetMetaDef(g_strGroupSection, strGroupGUID);

        WIZGROUPDATA group;
        group.strGroupGUID = strGroupGUID;
        group.strGroupName = strGroupName;
        arrayGroup.push_back(group);
    }

    return true;
}
Exemplo n.º 2
0
bool CWizDatabase::getUserGroupInfo(CWizGroupDataArray& arrayGroup)
{
    CString strTotal;
    bool bExist;

    if (!GetMeta(g_strGroupSection, "Count", strTotal, "", &bExist)) {
        return false;
    }

    // it's ok, user has no group data
    if (!bExist) {
        return true;
    }

    int nTotal = strTotal.toInt();
    for (int i = 0; i < nTotal; i++) {
        WIZGROUPDATA group;

        group.strGroupGUID = GetMetaDef(g_strGroupSection, QString::number(i));
        group.strGroupName = GetMetaDef(g_strGroupSection, group.strGroupGUID);

        group.bizGUID = GetMetaDef(g_strBizGroupSection, group.strGroupGUID);

        if (!group.bizGUID.isEmpty())
            group.bizName = GetMetaDef(g_strBizGroupSection, group.bizGUID);

        arrayGroup.push_back(group);
    }

    return true;
}