winix/plugins/ticket/ticketinfo.cpp

49 lines
513 B
C++
Executable File

#include "ticketinfo.h"
#include "core/error.h"
namespace Ticket
{
TicketInfo::TicketInfo()
{
Clear();
}
void TicketInfo::SetTDb(TDb * ptdb)
{
tdb = ptdb;
}
void TicketInfo::SetDb(Db * pdb)
{
db = pdb;
}
void TicketInfo::Clear()
{
item.Clear();
is_ticket = false;
ticket.Clear();
ticket_tab.clear();
}
void TicketInfo::ReadTicket(long dir_id)
{
if( tdb->GetTicketByDirId(dir_id, ticket) == WINIX_ERR_OK )
{
is_ticket = true;
db->GetItemById(ticket.item_id, item);
}
}
} // namespace