//--------------------------------------------------------------------------- #ifndef JDBTaxProfTblH #define JDBTaxProfTblH //--------------------------------------------------------------------------- #include #include #include #include "JDBTable.h" #include "JDBTaxProfHdrTbl.h" //--------------------------------------------------------------------------- // INDEX DEFINES //#define idxTPROF_ID 0 // id #define ndxTPROF_ID "PrimaryKey" // id //--------------------------------------------------------------------------- class PACKAGE TJDBTaxProfTable : public TJDBTable { private: bool filtCust, filtPart, filtNoDisabled, filtNoDefault; int __fastcall GetID(void) { return FieldByName("ID")->AsInteger; } void __fastcall SetID(int i) { FieldByName("ID")->AsInteger = i; } AnsiString __fastcall GetPName(void) { return FieldByName("PROFNAME")->AsString; } void __fastcall SetPName(AnsiString s) { FieldByName("PROFNAME")->AsString = s; } //double __fastcall GetPTax(int i) { return GetDblArrayField("PARTTAX", i); } //void __fastcall SetPTax(int i, double f) { SetDblArrayField("PARTTAX", i, f); } //double __fastcall GetLTax(int i) { return GetDblArrayField("LABORTAX", i); } //void __fastcall SetLTax(int i, double f) { SetDblArrayField("LABORTAX", i, f); } bool __fastcall GetPCode(int i) { return GetBoolArrayField("PARTCODE", i); } void __fastcall SetPCode(int i, bool c) { SetBoolArrayField("PARTCODE", i, c); } bool __fastcall GetLCode(int i) { return GetBoolArrayField("LABORCODE", i); } void __fastcall SetLCode(int i, bool c) { SetBoolArrayField("LABORCODE", i, c); } //bool __fastcall GetTaxable(int i) { return GetBoolArrayField("TAXTAXABLE", i); } //void __fastcall SetTaxable(int i, bool b) { SetBoolArrayField("TAXTAXABLE", i, b); } int __fastcall GetType(void) { return FieldByName("TYPE")->AsInteger; } void __fastcall SetType(int i) { FieldByName("TYPE")->AsInteger = i; } bool __fastcall GetDisabled(void) { return FieldByName("DISABLED")->AsBoolean; } void __fastcall SetDisabled(bool b) { FieldByName("DISABLED")->AsBoolean = b; } bool __fastcall GetApply(int i) { return GetBoolArrayField("APPLYTAX", i); } void __fastcall SetApply(int i, bool c) { SetBoolArrayField("APPLYTAX", i, c); } bool __fastcall GetTaxHM1(int i) { return GetBoolArrayField("TAXHAZMAT1x", i); } void __fastcall SetTaxHM1(int i, bool c) { SetBoolArrayField("TAXHAZMAT1x", i, c); } bool __fastcall GetTaxHM2(int i) { return GetBoolArrayField("TAXHAZMAT2x", i); } void __fastcall SetTaxHM2(int i, bool c) { SetBoolArrayField("TAXHAZMAT2x", i, c); } int __fastcall GetNextID(void); void __fastcall SetFilterCust(bool b); void __fastcall SetFilterPart(bool b); void __fastcall SetFilterNoDisabled(bool b); void __fastcall SetFilterNoDefault(bool b); void __fastcall ResetFilter(void); protected: inline AnsiString __fastcall GetTableDescription(void) { return "Tax Profile"; } void __fastcall SetupDefs(void); public: __fastcall TJDBTaxProfTable(TComponent* Owner); __property int ID = {read=GetID,write=SetID}; __property AnsiString ProfName = {read=GetPName,write=SetPName}; //__property double PartTax[int i] = {read=GetPTax,write=SetPTax}; //__property double LaborTax[int i] = {read=GetLTax,write=SetLTax}; __property bool PartExempt[int i] = {read=GetPCode,write=SetPCode}; __property bool LaborExempt[int i] = {read=GetLCode,write=SetLCode}; //__property bool TaxTaxable[int i] = {read=GetTaxable,write=SetTaxable}; __property int Type = {read=GetType,write=SetType}; __property bool Disabled = {read=GetDisabled,write=SetDisabled}; __property bool ApplyTax[int i] = {read=GetApply,write=SetApply}; __property bool TaxHazMat1[int i] = {read=GetTaxHM1,write=SetTaxHM1}; __property bool TaxHazMat2[int i] = {read=GetTaxHM2,write=SetTaxHM2}; __property int NextID = {read=GetNextID}; __property bool FilterCust = {write=SetFilterCust}; __property bool FilterPart = {write=SetFilterPart}; __property bool FilterNoDisabled = {write=SetFilterNoDisabled}; __property bool FilterNoDefault = {write=SetFilterNoDefault}; void ClearFilters(void); bool FindProfile(int id); void GetProfiles(TList *lst, int type, bool includedisabled); __published: }; //--------------------------------------------------------------------------- #endif è×°×d{zuèרլÕf‚zuè׉{zu¬ÕsxQvX$çÓ¢¿ÔÕ©½SM&Ø.Mú‹dIp