Esempio n. 1
0
void CApplication::UpdateNoteWnd( CNoteWnd* pWnd, CNote const& note )
{
	pWnd->SetId(note.GetId());
	pWnd->SetText(note.GetText());
	pWnd->SetCreatedDate(note.GetCreatedDate());
	pWnd->SetDeletedDate(note.GetDeletedDate());
	pWnd->SetLabel(note.GetLabel().c_str());
	pWnd->Refresh();
}
Esempio n. 2
0
void CApplication::DeleteFromStorage(int nNoteId, bool forever /*= false*/)
{
	if (nNoteId > 0)
	{
		CNote note = m_datafile->GetNote(nNoteId);
		if (note.GetDeletedDate().time == 0 && !forever)
		{
			note.SetDeletedDate(dateutils::GetCurrentDateTime());
			note.SetModifiedDate(dateutils::GetCurrentDateTime());
			m_datafile->SaveNote(note, NM_DELETED | NM_LABEL | NM_MODIFIED);
		}
		else
		{
			m_datafile->DeleteNote(nNoteId);
		}
	}
}
Esempio n. 3
0
BOOL CApplication::IsNoteDeleted( int nNoteId )
{
	CNote note = m_datafile->GetNote(nNoteId);
	return (timebn::isempty(note.GetDeletedDate()));
}