Example #1
0
 // ---------------------------------------------------------------------------------
 bool operator == (dp::Action const& lhs, dp::Action const& rhs)
 {
   if(!lhs.isValid())
   {
     return (!rhs.isValid());
   }
   return lhs.id() == rhs.id();
 }
Example #2
0
 // ---------------------------------------------------------------------------------
 success Action::update ( dp::Action const& _a ) const
 {
   if ( _a.id().isNull() )
   {
     return error();
   }
   kDebug()<<_a.id().toString();
   QSqlQuery query;
   query.prepare ( UPDATE_ACTION );
   query.addBindValue ( _a.task().toString() );
   query.addBindValue ( _a.project().toString() );
   query.addBindValue ( _a.collaborationType().toString() );
   query.addBindValue ( _a.name() );
   query.addBindValue ( _a.comment() );
   bindTimeValue ( query, _a.startTime() );
   bindTimeValue ( query, _a.endTime() );
   query.addBindValue ( _a.reviewed() );
   query.addBindValue ( _a.billed() );
   query.addBindValue ( _a.id().toString() );
   return execute ( query );
 }