46 #ifndef __WTX_CRM_PERSON_TEMPLATE_H_234e0174_6b7d_11e8_b503_fb1ef3651ec0__ 47 #define __WTX_CRM_PERSON_TEMPLATE_H_234e0174_6b7d_11e8_b503_fb1ef3651ec0__ 49 #include <Wtx/Util/Util.h> 50 #include <Wtx/Dbo/PermissionItemTpl.h> 52 #include <Wtx/Addons/Crm/Company/Item.h> 54 #include "Definition.h" 70 Template(
const std::string & keyField )
73 isLead ().setValue(
false );
74 isClient ().setValue(
false );
132 std::string csz()
const 134 std::string retVal = city().value();
136 retVal =
Wtx::append( retVal, state ().value(),
", " );
137 retVal =
Wtx::append( retVal, zip ().value(),
" " );
142 template<
class Action>
void persist( Action &a )
145 m_firstName .persist( a, &TableDef(). FirstNameFieldDef );
146 m_lastName .persist( a, &TableDef(). LastNameFieldDef );
147 m_middleName .persist( a, &TableDef(). MiddleNameFieldDef );
148 m_nickName .persist( a, &TableDef(). NickNameFieldDef );
149 m_abbreviation .persist( a, &TableDef(). AbbreviationFieldDef );
150 m_phone .persist( a, &TableDef(). PhoneFieldDef );
151 m_cell .persist( a, &TableDef(). CellFieldDef );
152 m_fax .persist( a, &TableDef(). FaxFieldDef );
153 m_email .persist( a, &TableDef(). EmailFieldDef );
154 m_notes .persist( a, &TableDef(). NotesFieldDef );
155 m_isLead .persist( a, &TableDef(). IsLeadFieldDef );
156 m_isClient .persist( a, &TableDef(). IsClientFieldDef );
158 m_street1 .persist( a, &TableDef(). Street1FieldDef );
159 m_street2 .persist( a, &TableDef(). Street2FieldDef );
160 m_city .persist( a, &TableDef(). CityFieldDef );
161 m_state .persist( a, &TableDef(). StateFieldDef );
162 m_zip .persist( a, &TableDef(). ZipFieldDef );
163 m_discount .persist( a, &TableDef(). DiscountFieldDef );
164 m_alert .persist( a, &TableDef(). AlertFieldDef );
165 m_contactForCompany .persist( a, &TableDef(). ContactForCompanyFieldDef );
200 #endif // end#ifndef __PERSONTPL_H___
std::string append(const std::string &s, const std::string &append, const std::string &separator)
Append a string to string.