GnuCashew ~ Web Application compatible with GnuCash sql data files.
GCW
Loading...
Searching...
No Matches
Employees.cpp
Go to the documentation of this file.
1#line 2 "src/Dbo/Employees/Employees.cpp"
2
3#include "../Glb/Core.h"
4#include "../App.h"
5#include "Employees.h"
6
7const char * GCW::Dbo::Employees::s_tableName = "employees";
8
9const Wt::WFormModel::Field GCW::Dbo::Employees::Field::guid = "guid" ; // text(32) PRIMARY KEY NOT NULL,
10const Wt::WFormModel::Field GCW::Dbo::Employees::Field::username = "username" ; // text(2048) NOT NULL,
11const Wt::WFormModel::Field GCW::Dbo::Employees::Field::id = "id" ; // text(2048) NOT NULL,
12const Wt::WFormModel::Field GCW::Dbo::Employees::Field::language = "language" ; // text(2048) NOT NULL,
13const Wt::WFormModel::Field GCW::Dbo::Employees::Field::acl = "acl" ; // text(2048) NOT NULL,
14const Wt::WFormModel::Field GCW::Dbo::Employees::Field::active = "active" ; // integer NOT NULL,
15const Wt::WFormModel::Field GCW::Dbo::Employees::Field::currency = "currency" ; // text(32) NOT NULL,
17const Wt::WFormModel::Field GCW::Dbo::Employees::Field::workday_num = "workday_num" ; // bigint NOT NULL,
18const Wt::WFormModel::Field GCW::Dbo::Employees::Field::workday_denom = "workday_denom" ; // bigint NOT NULL,
19const Wt::WFormModel::Field GCW::Dbo::Employees::Field::rate_num = "rate_num" ; // bigint NOT NULL,
20const Wt::WFormModel::Field GCW::Dbo::Employees::Field::rate_denom = "rate_denom" ; // bigint NOT NULL,
29
30
31auto
33load( const std::string & _guid )-> GCW::Dbo::Employees::Item::Ptr
34{
36
37 if( _guid != "" )
38 {
39
40 Wt::Dbo::Transaction t( GCW::app()-> gnucashew_session() );
41
42 try
43 {
44 retVal =
45 GCW::app()-> gnucashew_session().load< GCW::Dbo::Employees::Item >( _guid )
46 ;
47 }
48 catch( std::exception & e )
49 {
50 std::cout << __FILE__ << ":" << __LINE__ << " " << e.what() << std::endl;
51 }
52 }
53
54 return retVal;
55
56} // endload( const std::string & _guid )-> GCW::Dbo::Employees::Item::Ptr
57
58auto
60byGuid( const std::string & _guid )-> GCW::Dbo::Employees::Item::Ptr
61{
62 return load( _guid );
63
64} // endbyGuid( const std::string & _guid )-> GCW::Dbo::Employees::Item::Ptr
65
66
const char * Field
const Wt::WFormModel::Field addr_addr2
Definition Employees.cpp:23
const Wt::WFormModel::Field workday_denom
Definition Employees.cpp:18
const Wt::WFormModel::Field addr_name
Definition Employees.cpp:21
const Wt::WFormModel::Field acl
Definition Employees.cpp:13
const Wt::WFormModel::Field guid
Definition Employees.cpp:9
const Wt::WFormModel::Field language
Definition Employees.cpp:12
const Wt::WFormModel::Field rate_num
Definition Employees.cpp:19
const Wt::WFormModel::Field addr_addr3
Definition Employees.cpp:24
const Wt::WFormModel::Field username
Definition Employees.cpp:10
const Wt::WFormModel::Field addr_email
Definition Employees.cpp:28
const Wt::WFormModel::Field rate_denom
Definition Employees.cpp:20
const Wt::WFormModel::Field addr_addr1
Definition Employees.cpp:22
const Wt::WFormModel::Field ccard_guid
Definition Employees.cpp:16
const Wt::WFormModel::Field currency
Definition Employees.cpp:15
const Wt::WFormModel::Field workday_num
Definition Employees.cpp:17
const Wt::WFormModel::Field id
Definition Employees.cpp:11
const Wt::WFormModel::Field addr_addr4
Definition Employees.cpp:25
const Wt::WFormModel::Field addr_phone
Definition Employees.cpp:26
const Wt::WFormModel::Field active
Definition Employees.cpp:14
const Wt::WFormModel::Field addr_fax
Definition Employees.cpp:27
auto load(const std::string &_guid) -> Item::Ptr
Load by Guid.
Definition Employees.cpp:33
auto byGuid(const std::string &_guid) -> Item::Ptr
Load by Guid.
Definition Employees.cpp:60
const char * s_tableName
Definition Employees.cpp:7
App * app()
Definition App.cpp:75