Example #1
0
void CConfigRecord::SaveRecordAll()
{
	int nIndex = m_ctlChannel.GetCurSel();
	if (nIndex == m_nChannelNum)
	{
		for (int i = 0;i<m_nChannelNum;i++)
		{
			SaveRecordInfo(i);
		}
	}else
	{
		SaveRecordInfo(nIndex);
	}
}
Example #2
0
void CConfigRecord::OnSelchangeComboChanno() 
{
	// TODO: Add your control notification handler code here
	int nIndex = m_ctlChannel.GetCurSel();
	if (nIndex == m_nChannelNum)
	{
		ShowWindow(0);
		m_nLastChannel = nIndex;
	}
	else
	{
		if (m_nLastChannel == m_nChannelNum)
		{
			ShowWindow(nIndex);
			m_nLastChannel = nIndex;
		}else
		{
			if (nIndex != m_nLastChannel)
			{
				SaveRecordInfo(m_nLastChannel);
				m_nLastChannel = nIndex;
				ShowWindow(nIndex);
			}
		}
	}
}
bool NFCCommonRedisModule::SaveRecordInfo(const NFGUID& self, NF_SHARE_PTR<NFIRecordManager> pRecordManager, const int nExpireSecond)
{
    if (self.IsNull())
    {
        return false;
    }

    if (!pRecordManager)
    {
        return false;
    }

	NFMsg::ObjectRecordList xRecordList;
	if (ConvertRecordManagerToPB(pRecordManager, &xRecordList))
	{
		return SaveRecordInfo(self, xRecordList, nExpireSecond);
	}

    return false;
}