982 lines
38 KiB
ObjectPascal
982 lines
38 KiB
ObjectPascal
unit SchemaClient_Intf;
|
|
|
|
interface
|
|
|
|
uses
|
|
Classes, DB, SysUtils, uROClasses, uDADataTable;
|
|
|
|
const
|
|
{ Data table rules ids
|
|
Feel free to change them to something more human readable
|
|
but make sure they are unique in the context of your application }
|
|
RID_Customers = '{A9F7C630-77E0-44A8-B46B-E3EE67954A42}';
|
|
RID_Orders = '{B5125DCD-A27D-488D-A1A2-4FB5D49D7079}';
|
|
|
|
{ Data table names }
|
|
nme_Customers = 'Customers';
|
|
nme_Orders = 'Orders';
|
|
|
|
{ Customers fields }
|
|
fld_CustomersCustomerID = 'CustomerID';
|
|
fld_CustomersCompanyName = 'CompanyName';
|
|
fld_CustomersContactName = 'ContactName';
|
|
fld_CustomersContactTitle = 'ContactTitle';
|
|
fld_CustomersAddress = 'Address';
|
|
fld_CustomersCity = 'City';
|
|
fld_CustomersRegion = 'Region';
|
|
fld_CustomersPostalCode = 'PostalCode';
|
|
fld_CustomersCountry = 'Country';
|
|
fld_CustomersPhone = 'Phone';
|
|
fld_CustomersFax = 'Fax';
|
|
|
|
{ Customers field indexes }
|
|
idx_CustomersCustomerID = 0;
|
|
idx_CustomersCompanyName = 1;
|
|
idx_CustomersContactName = 2;
|
|
idx_CustomersContactTitle = 3;
|
|
idx_CustomersAddress = 4;
|
|
idx_CustomersCity = 5;
|
|
idx_CustomersRegion = 6;
|
|
idx_CustomersPostalCode = 7;
|
|
idx_CustomersCountry = 8;
|
|
idx_CustomersPhone = 9;
|
|
idx_CustomersFax = 10;
|
|
|
|
{ Orders fields }
|
|
fld_OrdersOrderID = 'OrderID';
|
|
fld_OrdersCustomerID = 'CustomerID';
|
|
fld_OrdersEmployeeID = 'EmployeeID';
|
|
fld_OrdersOrderDate = 'OrderDate';
|
|
fld_OrdersRequiredDate = 'RequiredDate';
|
|
fld_OrdersShippedDate = 'ShippedDate';
|
|
fld_OrdersShipVia = 'ShipVia';
|
|
fld_OrdersFreight = 'Freight';
|
|
fld_OrdersShipName = 'ShipName';
|
|
fld_OrdersShipAddress = 'ShipAddress';
|
|
fld_OrdersShipCity = 'ShipCity';
|
|
fld_OrdersShipRegion = 'ShipRegion';
|
|
fld_OrdersShipPostalCode = 'ShipPostalCode';
|
|
fld_OrdersShipCountry = 'ShipCountry';
|
|
|
|
{ Orders field indexes }
|
|
idx_OrdersOrderID = 0;
|
|
idx_OrdersCustomerID = 1;
|
|
idx_OrdersEmployeeID = 2;
|
|
idx_OrdersOrderDate = 3;
|
|
idx_OrdersRequiredDate = 4;
|
|
idx_OrdersShippedDate = 5;
|
|
idx_OrdersShipVia = 6;
|
|
idx_OrdersFreight = 7;
|
|
idx_OrdersShipName = 8;
|
|
idx_OrdersShipAddress = 9;
|
|
idx_OrdersShipCity = 10;
|
|
idx_OrdersShipRegion = 11;
|
|
idx_OrdersShipPostalCode = 12;
|
|
idx_OrdersShipCountry = 13;
|
|
|
|
type
|
|
{ ICustomers }
|
|
ICustomers = interface(IDAStronglyTypedDataTable)
|
|
['{AD74260F-B808-430E-85E6-FB469055C068}']
|
|
{ Property getters and setters }
|
|
function GetCustomerIDValue: WideString;
|
|
procedure SetCustomerIDValue(const aValue: WideString);
|
|
function GetCustomerIDIsNull: Boolean;
|
|
procedure SetCustomerIDIsNull(const aValue: Boolean);
|
|
function GetCompanyNameValue: WideString;
|
|
procedure SetCompanyNameValue(const aValue: WideString);
|
|
function GetCompanyNameIsNull: Boolean;
|
|
procedure SetCompanyNameIsNull(const aValue: Boolean);
|
|
function GetContactNameValue: WideString;
|
|
procedure SetContactNameValue(const aValue: WideString);
|
|
function GetContactNameIsNull: Boolean;
|
|
procedure SetContactNameIsNull(const aValue: Boolean);
|
|
function GetContactTitleValue: WideString;
|
|
procedure SetContactTitleValue(const aValue: WideString);
|
|
function GetContactTitleIsNull: Boolean;
|
|
procedure SetContactTitleIsNull(const aValue: Boolean);
|
|
function GetAddressValue: WideString;
|
|
procedure SetAddressValue(const aValue: WideString);
|
|
function GetAddressIsNull: Boolean;
|
|
procedure SetAddressIsNull(const aValue: Boolean);
|
|
function GetCityValue: WideString;
|
|
procedure SetCityValue(const aValue: WideString);
|
|
function GetCityIsNull: Boolean;
|
|
procedure SetCityIsNull(const aValue: Boolean);
|
|
function GetRegionValue: WideString;
|
|
procedure SetRegionValue(const aValue: WideString);
|
|
function GetRegionIsNull: Boolean;
|
|
procedure SetRegionIsNull(const aValue: Boolean);
|
|
function GetPostalCodeValue: WideString;
|
|
procedure SetPostalCodeValue(const aValue: WideString);
|
|
function GetPostalCodeIsNull: Boolean;
|
|
procedure SetPostalCodeIsNull(const aValue: Boolean);
|
|
function GetCountryValue: WideString;
|
|
procedure SetCountryValue(const aValue: WideString);
|
|
function GetCountryIsNull: Boolean;
|
|
procedure SetCountryIsNull(const aValue: Boolean);
|
|
function GetPhoneValue: WideString;
|
|
procedure SetPhoneValue(const aValue: WideString);
|
|
function GetPhoneIsNull: Boolean;
|
|
procedure SetPhoneIsNull(const aValue: Boolean);
|
|
function GetFaxValue: WideString;
|
|
procedure SetFaxValue(const aValue: WideString);
|
|
function GetFaxIsNull: Boolean;
|
|
procedure SetFaxIsNull(const aValue: Boolean);
|
|
|
|
|
|
{ Properties }
|
|
property CustomerID: WideString read GetCustomerIDValue write SetCustomerIDValue;
|
|
property CustomerIDIsNull: Boolean read GetCustomerIDIsNull write SetCustomerIDIsNull;
|
|
property CompanyName: WideString read GetCompanyNameValue write SetCompanyNameValue;
|
|
property CompanyNameIsNull: Boolean read GetCompanyNameIsNull write SetCompanyNameIsNull;
|
|
property ContactName: WideString read GetContactNameValue write SetContactNameValue;
|
|
property ContactNameIsNull: Boolean read GetContactNameIsNull write SetContactNameIsNull;
|
|
property ContactTitle: WideString read GetContactTitleValue write SetContactTitleValue;
|
|
property ContactTitleIsNull: Boolean read GetContactTitleIsNull write SetContactTitleIsNull;
|
|
property Address: WideString read GetAddressValue write SetAddressValue;
|
|
property AddressIsNull: Boolean read GetAddressIsNull write SetAddressIsNull;
|
|
property City: WideString read GetCityValue write SetCityValue;
|
|
property CityIsNull: Boolean read GetCityIsNull write SetCityIsNull;
|
|
property Region: WideString read GetRegionValue write SetRegionValue;
|
|
property RegionIsNull: Boolean read GetRegionIsNull write SetRegionIsNull;
|
|
property PostalCode: WideString read GetPostalCodeValue write SetPostalCodeValue;
|
|
property PostalCodeIsNull: Boolean read GetPostalCodeIsNull write SetPostalCodeIsNull;
|
|
property Country: WideString read GetCountryValue write SetCountryValue;
|
|
property CountryIsNull: Boolean read GetCountryIsNull write SetCountryIsNull;
|
|
property Phone: WideString read GetPhoneValue write SetPhoneValue;
|
|
property PhoneIsNull: Boolean read GetPhoneIsNull write SetPhoneIsNull;
|
|
property Fax: WideString read GetFaxValue write SetFaxValue;
|
|
property FaxIsNull: Boolean read GetFaxIsNull write SetFaxIsNull;
|
|
end;
|
|
|
|
{ TCustomersDataTableRules }
|
|
TCustomersDataTableRules = class(TDADataTableRules, ICustomers)
|
|
private
|
|
protected
|
|
{ Property getters and setters }
|
|
function GetCustomerIDValue: WideString; virtual;
|
|
procedure SetCustomerIDValue(const aValue: WideString); virtual;
|
|
function GetCustomerIDIsNull: Boolean; virtual;
|
|
procedure SetCustomerIDIsNull(const aValue: Boolean); virtual;
|
|
function GetCompanyNameValue: WideString; virtual;
|
|
procedure SetCompanyNameValue(const aValue: WideString); virtual;
|
|
function GetCompanyNameIsNull: Boolean; virtual;
|
|
procedure SetCompanyNameIsNull(const aValue: Boolean); virtual;
|
|
function GetContactNameValue: WideString; virtual;
|
|
procedure SetContactNameValue(const aValue: WideString); virtual;
|
|
function GetContactNameIsNull: Boolean; virtual;
|
|
procedure SetContactNameIsNull(const aValue: Boolean); virtual;
|
|
function GetContactTitleValue: WideString; virtual;
|
|
procedure SetContactTitleValue(const aValue: WideString); virtual;
|
|
function GetContactTitleIsNull: Boolean; virtual;
|
|
procedure SetContactTitleIsNull(const aValue: Boolean); virtual;
|
|
function GetAddressValue: WideString; virtual;
|
|
procedure SetAddressValue(const aValue: WideString); virtual;
|
|
function GetAddressIsNull: Boolean; virtual;
|
|
procedure SetAddressIsNull(const aValue: Boolean); virtual;
|
|
function GetCityValue: WideString; virtual;
|
|
procedure SetCityValue(const aValue: WideString); virtual;
|
|
function GetCityIsNull: Boolean; virtual;
|
|
procedure SetCityIsNull(const aValue: Boolean); virtual;
|
|
function GetRegionValue: WideString; virtual;
|
|
procedure SetRegionValue(const aValue: WideString); virtual;
|
|
function GetRegionIsNull: Boolean; virtual;
|
|
procedure SetRegionIsNull(const aValue: Boolean); virtual;
|
|
function GetPostalCodeValue: WideString; virtual;
|
|
procedure SetPostalCodeValue(const aValue: WideString); virtual;
|
|
function GetPostalCodeIsNull: Boolean; virtual;
|
|
procedure SetPostalCodeIsNull(const aValue: Boolean); virtual;
|
|
function GetCountryValue: WideString; virtual;
|
|
procedure SetCountryValue(const aValue: WideString); virtual;
|
|
function GetCountryIsNull: Boolean; virtual;
|
|
procedure SetCountryIsNull(const aValue: Boolean); virtual;
|
|
function GetPhoneValue: WideString; virtual;
|
|
procedure SetPhoneValue(const aValue: WideString); virtual;
|
|
function GetPhoneIsNull: Boolean; virtual;
|
|
procedure SetPhoneIsNull(const aValue: Boolean); virtual;
|
|
function GetFaxValue: WideString; virtual;
|
|
procedure SetFaxValue(const aValue: WideString); virtual;
|
|
function GetFaxIsNull: Boolean; virtual;
|
|
procedure SetFaxIsNull(const aValue: Boolean); virtual;
|
|
|
|
{ Properties }
|
|
property CustomerID: WideString read GetCustomerIDValue write SetCustomerIDValue;
|
|
property CustomerIDIsNull: Boolean read GetCustomerIDIsNull write SetCustomerIDIsNull;
|
|
property CompanyName: WideString read GetCompanyNameValue write SetCompanyNameValue;
|
|
property CompanyNameIsNull: Boolean read GetCompanyNameIsNull write SetCompanyNameIsNull;
|
|
property ContactName: WideString read GetContactNameValue write SetContactNameValue;
|
|
property ContactNameIsNull: Boolean read GetContactNameIsNull write SetContactNameIsNull;
|
|
property ContactTitle: WideString read GetContactTitleValue write SetContactTitleValue;
|
|
property ContactTitleIsNull: Boolean read GetContactTitleIsNull write SetContactTitleIsNull;
|
|
property Address: WideString read GetAddressValue write SetAddressValue;
|
|
property AddressIsNull: Boolean read GetAddressIsNull write SetAddressIsNull;
|
|
property City: WideString read GetCityValue write SetCityValue;
|
|
property CityIsNull: Boolean read GetCityIsNull write SetCityIsNull;
|
|
property Region: WideString read GetRegionValue write SetRegionValue;
|
|
property RegionIsNull: Boolean read GetRegionIsNull write SetRegionIsNull;
|
|
property PostalCode: WideString read GetPostalCodeValue write SetPostalCodeValue;
|
|
property PostalCodeIsNull: Boolean read GetPostalCodeIsNull write SetPostalCodeIsNull;
|
|
property Country: WideString read GetCountryValue write SetCountryValue;
|
|
property CountryIsNull: Boolean read GetCountryIsNull write SetCountryIsNull;
|
|
property Phone: WideString read GetPhoneValue write SetPhoneValue;
|
|
property PhoneIsNull: Boolean read GetPhoneIsNull write SetPhoneIsNull;
|
|
property Fax: WideString read GetFaxValue write SetFaxValue;
|
|
property FaxIsNull: Boolean read GetFaxIsNull write SetFaxIsNull;
|
|
|
|
public
|
|
constructor Create(aDataTable: TDADataTable); override;
|
|
destructor Destroy; override;
|
|
|
|
end;
|
|
|
|
{ IOrders }
|
|
IOrders = interface(IDAStronglyTypedDataTable)
|
|
['{837F52E1-CF1E-44B5-9026-31E65685B868}']
|
|
{ Property getters and setters }
|
|
function GetOrderIDValue: Integer;
|
|
procedure SetOrderIDValue(const aValue: Integer);
|
|
function GetOrderIDIsNull: Boolean;
|
|
procedure SetOrderIDIsNull(const aValue: Boolean);
|
|
function GetCustomerIDValue: WideString;
|
|
procedure SetCustomerIDValue(const aValue: WideString);
|
|
function GetCustomerIDIsNull: Boolean;
|
|
procedure SetCustomerIDIsNull(const aValue: Boolean);
|
|
function GetEmployeeIDValue: Integer;
|
|
procedure SetEmployeeIDValue(const aValue: Integer);
|
|
function GetEmployeeIDIsNull: Boolean;
|
|
procedure SetEmployeeIDIsNull(const aValue: Boolean);
|
|
function GetOrderDateValue: DateTime;
|
|
procedure SetOrderDateValue(const aValue: DateTime);
|
|
function GetOrderDateIsNull: Boolean;
|
|
procedure SetOrderDateIsNull(const aValue: Boolean);
|
|
function GetRequiredDateValue: DateTime;
|
|
procedure SetRequiredDateValue(const aValue: DateTime);
|
|
function GetRequiredDateIsNull: Boolean;
|
|
procedure SetRequiredDateIsNull(const aValue: Boolean);
|
|
function GetShippedDateValue: DateTime;
|
|
procedure SetShippedDateValue(const aValue: DateTime);
|
|
function GetShippedDateIsNull: Boolean;
|
|
procedure SetShippedDateIsNull(const aValue: Boolean);
|
|
function GetShipViaValue: Integer;
|
|
procedure SetShipViaValue(const aValue: Integer);
|
|
function GetShipViaIsNull: Boolean;
|
|
procedure SetShipViaIsNull(const aValue: Boolean);
|
|
function GetFreightValue: Float;
|
|
procedure SetFreightValue(const aValue: Float);
|
|
function GetFreightIsNull: Boolean;
|
|
procedure SetFreightIsNull(const aValue: Boolean);
|
|
function GetShipNameValue: WideString;
|
|
procedure SetShipNameValue(const aValue: WideString);
|
|
function GetShipNameIsNull: Boolean;
|
|
procedure SetShipNameIsNull(const aValue: Boolean);
|
|
function GetShipAddressValue: WideString;
|
|
procedure SetShipAddressValue(const aValue: WideString);
|
|
function GetShipAddressIsNull: Boolean;
|
|
procedure SetShipAddressIsNull(const aValue: Boolean);
|
|
function GetShipCityValue: WideString;
|
|
procedure SetShipCityValue(const aValue: WideString);
|
|
function GetShipCityIsNull: Boolean;
|
|
procedure SetShipCityIsNull(const aValue: Boolean);
|
|
function GetShipRegionValue: WideString;
|
|
procedure SetShipRegionValue(const aValue: WideString);
|
|
function GetShipRegionIsNull: Boolean;
|
|
procedure SetShipRegionIsNull(const aValue: Boolean);
|
|
function GetShipPostalCodeValue: WideString;
|
|
procedure SetShipPostalCodeValue(const aValue: WideString);
|
|
function GetShipPostalCodeIsNull: Boolean;
|
|
procedure SetShipPostalCodeIsNull(const aValue: Boolean);
|
|
function GetShipCountryValue: WideString;
|
|
procedure SetShipCountryValue(const aValue: WideString);
|
|
function GetShipCountryIsNull: Boolean;
|
|
procedure SetShipCountryIsNull(const aValue: Boolean);
|
|
|
|
|
|
{ Properties }
|
|
property OrderID: Integer read GetOrderIDValue write SetOrderIDValue;
|
|
property OrderIDIsNull: Boolean read GetOrderIDIsNull write SetOrderIDIsNull;
|
|
property CustomerID: WideString read GetCustomerIDValue write SetCustomerIDValue;
|
|
property CustomerIDIsNull: Boolean read GetCustomerIDIsNull write SetCustomerIDIsNull;
|
|
property EmployeeID: Integer read GetEmployeeIDValue write SetEmployeeIDValue;
|
|
property EmployeeIDIsNull: Boolean read GetEmployeeIDIsNull write SetEmployeeIDIsNull;
|
|
property OrderDate: DateTime read GetOrderDateValue write SetOrderDateValue;
|
|
property OrderDateIsNull: Boolean read GetOrderDateIsNull write SetOrderDateIsNull;
|
|
property RequiredDate: DateTime read GetRequiredDateValue write SetRequiredDateValue;
|
|
property RequiredDateIsNull: Boolean read GetRequiredDateIsNull write SetRequiredDateIsNull;
|
|
property ShippedDate: DateTime read GetShippedDateValue write SetShippedDateValue;
|
|
property ShippedDateIsNull: Boolean read GetShippedDateIsNull write SetShippedDateIsNull;
|
|
property ShipVia: Integer read GetShipViaValue write SetShipViaValue;
|
|
property ShipViaIsNull: Boolean read GetShipViaIsNull write SetShipViaIsNull;
|
|
property Freight: Float read GetFreightValue write SetFreightValue;
|
|
property FreightIsNull: Boolean read GetFreightIsNull write SetFreightIsNull;
|
|
property ShipName: WideString read GetShipNameValue write SetShipNameValue;
|
|
property ShipNameIsNull: Boolean read GetShipNameIsNull write SetShipNameIsNull;
|
|
property ShipAddress: WideString read GetShipAddressValue write SetShipAddressValue;
|
|
property ShipAddressIsNull: Boolean read GetShipAddressIsNull write SetShipAddressIsNull;
|
|
property ShipCity: WideString read GetShipCityValue write SetShipCityValue;
|
|
property ShipCityIsNull: Boolean read GetShipCityIsNull write SetShipCityIsNull;
|
|
property ShipRegion: WideString read GetShipRegionValue write SetShipRegionValue;
|
|
property ShipRegionIsNull: Boolean read GetShipRegionIsNull write SetShipRegionIsNull;
|
|
property ShipPostalCode: WideString read GetShipPostalCodeValue write SetShipPostalCodeValue;
|
|
property ShipPostalCodeIsNull: Boolean read GetShipPostalCodeIsNull write SetShipPostalCodeIsNull;
|
|
property ShipCountry: WideString read GetShipCountryValue write SetShipCountryValue;
|
|
property ShipCountryIsNull: Boolean read GetShipCountryIsNull write SetShipCountryIsNull;
|
|
end;
|
|
|
|
{ TOrdersDataTableRules }
|
|
TOrdersDataTableRules = class(TDADataTableRules, IOrders)
|
|
private
|
|
protected
|
|
{ Property getters and setters }
|
|
function GetOrderIDValue: Integer; virtual;
|
|
procedure SetOrderIDValue(const aValue: Integer); virtual;
|
|
function GetOrderIDIsNull: Boolean; virtual;
|
|
procedure SetOrderIDIsNull(const aValue: Boolean); virtual;
|
|
function GetCustomerIDValue: WideString; virtual;
|
|
procedure SetCustomerIDValue(const aValue: WideString); virtual;
|
|
function GetCustomerIDIsNull: Boolean; virtual;
|
|
procedure SetCustomerIDIsNull(const aValue: Boolean); virtual;
|
|
function GetEmployeeIDValue: Integer; virtual;
|
|
procedure SetEmployeeIDValue(const aValue: Integer); virtual;
|
|
function GetEmployeeIDIsNull: Boolean; virtual;
|
|
procedure SetEmployeeIDIsNull(const aValue: Boolean); virtual;
|
|
function GetOrderDateValue: DateTime; virtual;
|
|
procedure SetOrderDateValue(const aValue: DateTime); virtual;
|
|
function GetOrderDateIsNull: Boolean; virtual;
|
|
procedure SetOrderDateIsNull(const aValue: Boolean); virtual;
|
|
function GetRequiredDateValue: DateTime; virtual;
|
|
procedure SetRequiredDateValue(const aValue: DateTime); virtual;
|
|
function GetRequiredDateIsNull: Boolean; virtual;
|
|
procedure SetRequiredDateIsNull(const aValue: Boolean); virtual;
|
|
function GetShippedDateValue: DateTime; virtual;
|
|
procedure SetShippedDateValue(const aValue: DateTime); virtual;
|
|
function GetShippedDateIsNull: Boolean; virtual;
|
|
procedure SetShippedDateIsNull(const aValue: Boolean); virtual;
|
|
function GetShipViaValue: Integer; virtual;
|
|
procedure SetShipViaValue(const aValue: Integer); virtual;
|
|
function GetShipViaIsNull: Boolean; virtual;
|
|
procedure SetShipViaIsNull(const aValue: Boolean); virtual;
|
|
function GetFreightValue: Float; virtual;
|
|
procedure SetFreightValue(const aValue: Float); virtual;
|
|
function GetFreightIsNull: Boolean; virtual;
|
|
procedure SetFreightIsNull(const aValue: Boolean); virtual;
|
|
function GetShipNameValue: WideString; virtual;
|
|
procedure SetShipNameValue(const aValue: WideString); virtual;
|
|
function GetShipNameIsNull: Boolean; virtual;
|
|
procedure SetShipNameIsNull(const aValue: Boolean); virtual;
|
|
function GetShipAddressValue: WideString; virtual;
|
|
procedure SetShipAddressValue(const aValue: WideString); virtual;
|
|
function GetShipAddressIsNull: Boolean; virtual;
|
|
procedure SetShipAddressIsNull(const aValue: Boolean); virtual;
|
|
function GetShipCityValue: WideString; virtual;
|
|
procedure SetShipCityValue(const aValue: WideString); virtual;
|
|
function GetShipCityIsNull: Boolean; virtual;
|
|
procedure SetShipCityIsNull(const aValue: Boolean); virtual;
|
|
function GetShipRegionValue: WideString; virtual;
|
|
procedure SetShipRegionValue(const aValue: WideString); virtual;
|
|
function GetShipRegionIsNull: Boolean; virtual;
|
|
procedure SetShipRegionIsNull(const aValue: Boolean); virtual;
|
|
function GetShipPostalCodeValue: WideString; virtual;
|
|
procedure SetShipPostalCodeValue(const aValue: WideString); virtual;
|
|
function GetShipPostalCodeIsNull: Boolean; virtual;
|
|
procedure SetShipPostalCodeIsNull(const aValue: Boolean); virtual;
|
|
function GetShipCountryValue: WideString; virtual;
|
|
procedure SetShipCountryValue(const aValue: WideString); virtual;
|
|
function GetShipCountryIsNull: Boolean; virtual;
|
|
procedure SetShipCountryIsNull(const aValue: Boolean); virtual;
|
|
|
|
{ Properties }
|
|
property OrderID: Integer read GetOrderIDValue write SetOrderIDValue;
|
|
property OrderIDIsNull: Boolean read GetOrderIDIsNull write SetOrderIDIsNull;
|
|
property CustomerID: WideString read GetCustomerIDValue write SetCustomerIDValue;
|
|
property CustomerIDIsNull: Boolean read GetCustomerIDIsNull write SetCustomerIDIsNull;
|
|
property EmployeeID: Integer read GetEmployeeIDValue write SetEmployeeIDValue;
|
|
property EmployeeIDIsNull: Boolean read GetEmployeeIDIsNull write SetEmployeeIDIsNull;
|
|
property OrderDate: DateTime read GetOrderDateValue write SetOrderDateValue;
|
|
property OrderDateIsNull: Boolean read GetOrderDateIsNull write SetOrderDateIsNull;
|
|
property RequiredDate: DateTime read GetRequiredDateValue write SetRequiredDateValue;
|
|
property RequiredDateIsNull: Boolean read GetRequiredDateIsNull write SetRequiredDateIsNull;
|
|
property ShippedDate: DateTime read GetShippedDateValue write SetShippedDateValue;
|
|
property ShippedDateIsNull: Boolean read GetShippedDateIsNull write SetShippedDateIsNull;
|
|
property ShipVia: Integer read GetShipViaValue write SetShipViaValue;
|
|
property ShipViaIsNull: Boolean read GetShipViaIsNull write SetShipViaIsNull;
|
|
property Freight: Float read GetFreightValue write SetFreightValue;
|
|
property FreightIsNull: Boolean read GetFreightIsNull write SetFreightIsNull;
|
|
property ShipName: WideString read GetShipNameValue write SetShipNameValue;
|
|
property ShipNameIsNull: Boolean read GetShipNameIsNull write SetShipNameIsNull;
|
|
property ShipAddress: WideString read GetShipAddressValue write SetShipAddressValue;
|
|
property ShipAddressIsNull: Boolean read GetShipAddressIsNull write SetShipAddressIsNull;
|
|
property ShipCity: WideString read GetShipCityValue write SetShipCityValue;
|
|
property ShipCityIsNull: Boolean read GetShipCityIsNull write SetShipCityIsNull;
|
|
property ShipRegion: WideString read GetShipRegionValue write SetShipRegionValue;
|
|
property ShipRegionIsNull: Boolean read GetShipRegionIsNull write SetShipRegionIsNull;
|
|
property ShipPostalCode: WideString read GetShipPostalCodeValue write SetShipPostalCodeValue;
|
|
property ShipPostalCodeIsNull: Boolean read GetShipPostalCodeIsNull write SetShipPostalCodeIsNull;
|
|
property ShipCountry: WideString read GetShipCountryValue write SetShipCountryValue;
|
|
property ShipCountryIsNull: Boolean read GetShipCountryIsNull write SetShipCountryIsNull;
|
|
|
|
public
|
|
constructor Create(aDataTable: TDADataTable); override;
|
|
destructor Destroy; override;
|
|
|
|
end;
|
|
|
|
implementation
|
|
|
|
uses Variants;
|
|
|
|
{ TCustomersDataTableRules }
|
|
constructor TCustomersDataTableRules.Create(aDataTable: TDADataTable);
|
|
begin
|
|
inherited;
|
|
end;
|
|
|
|
destructor TCustomersDataTableRules.Destroy;
|
|
begin
|
|
inherited;
|
|
end;
|
|
|
|
function TCustomersDataTableRules.GetCustomerIDValue: WideString;
|
|
begin
|
|
result := DataTable.Fields[idx_CustomersCustomerID].AsWideString;
|
|
end;
|
|
|
|
procedure TCustomersDataTableRules.SetCustomerIDValue(const aValue: WideString);
|
|
begin
|
|
DataTable.Fields[idx_CustomersCustomerID].AsWideString := aValue;
|
|
end;
|
|
|
|
function TCustomersDataTableRules.GetCustomerIDIsNull: boolean;
|
|
begin
|
|
result := DataTable.Fields[idx_CustomersCustomerID].IsNull;
|
|
end;
|
|
|
|
procedure TCustomersDataTableRules.SetCustomerIDIsNull(const aValue: Boolean);
|
|
begin
|
|
if aValue then
|
|
DataTable.Fields[idx_CustomersCustomerID].AsVariant := Null;
|
|
end;
|
|
|
|
function TCustomersDataTableRules.GetCompanyNameValue: WideString;
|
|
begin
|
|
result := DataTable.Fields[idx_CustomersCompanyName].AsWideString;
|
|
end;
|
|
|
|
procedure TCustomersDataTableRules.SetCompanyNameValue(const aValue: WideString);
|
|
begin
|
|
DataTable.Fields[idx_CustomersCompanyName].AsWideString := aValue;
|
|
end;
|
|
|
|
function TCustomersDataTableRules.GetCompanyNameIsNull: boolean;
|
|
begin
|
|
result := DataTable.Fields[idx_CustomersCompanyName].IsNull;
|
|
end;
|
|
|
|
procedure TCustomersDataTableRules.SetCompanyNameIsNull(const aValue: Boolean);
|
|
begin
|
|
if aValue then
|
|
DataTable.Fields[idx_CustomersCompanyName].AsVariant := Null;
|
|
end;
|
|
|
|
function TCustomersDataTableRules.GetContactNameValue: WideString;
|
|
begin
|
|
result := DataTable.Fields[idx_CustomersContactName].AsWideString;
|
|
end;
|
|
|
|
procedure TCustomersDataTableRules.SetContactNameValue(const aValue: WideString);
|
|
begin
|
|
DataTable.Fields[idx_CustomersContactName].AsWideString := aValue;
|
|
end;
|
|
|
|
function TCustomersDataTableRules.GetContactNameIsNull: boolean;
|
|
begin
|
|
result := DataTable.Fields[idx_CustomersContactName].IsNull;
|
|
end;
|
|
|
|
procedure TCustomersDataTableRules.SetContactNameIsNull(const aValue: Boolean);
|
|
begin
|
|
if aValue then
|
|
DataTable.Fields[idx_CustomersContactName].AsVariant := Null;
|
|
end;
|
|
|
|
function TCustomersDataTableRules.GetContactTitleValue: WideString;
|
|
begin
|
|
result := DataTable.Fields[idx_CustomersContactTitle].AsWideString;
|
|
end;
|
|
|
|
procedure TCustomersDataTableRules.SetContactTitleValue(const aValue: WideString);
|
|
begin
|
|
DataTable.Fields[idx_CustomersContactTitle].AsWideString := aValue;
|
|
end;
|
|
|
|
function TCustomersDataTableRules.GetContactTitleIsNull: boolean;
|
|
begin
|
|
result := DataTable.Fields[idx_CustomersContactTitle].IsNull;
|
|
end;
|
|
|
|
procedure TCustomersDataTableRules.SetContactTitleIsNull(const aValue: Boolean);
|
|
begin
|
|
if aValue then
|
|
DataTable.Fields[idx_CustomersContactTitle].AsVariant := Null;
|
|
end;
|
|
|
|
function TCustomersDataTableRules.GetAddressValue: WideString;
|
|
begin
|
|
result := DataTable.Fields[idx_CustomersAddress].AsWideString;
|
|
end;
|
|
|
|
procedure TCustomersDataTableRules.SetAddressValue(const aValue: WideString);
|
|
begin
|
|
DataTable.Fields[idx_CustomersAddress].AsWideString := aValue;
|
|
end;
|
|
|
|
function TCustomersDataTableRules.GetAddressIsNull: boolean;
|
|
begin
|
|
result := DataTable.Fields[idx_CustomersAddress].IsNull;
|
|
end;
|
|
|
|
procedure TCustomersDataTableRules.SetAddressIsNull(const aValue: Boolean);
|
|
begin
|
|
if aValue then
|
|
DataTable.Fields[idx_CustomersAddress].AsVariant := Null;
|
|
end;
|
|
|
|
function TCustomersDataTableRules.GetCityValue: WideString;
|
|
begin
|
|
result := DataTable.Fields[idx_CustomersCity].AsWideString;
|
|
end;
|
|
|
|
procedure TCustomersDataTableRules.SetCityValue(const aValue: WideString);
|
|
begin
|
|
DataTable.Fields[idx_CustomersCity].AsWideString := aValue;
|
|
end;
|
|
|
|
function TCustomersDataTableRules.GetCityIsNull: boolean;
|
|
begin
|
|
result := DataTable.Fields[idx_CustomersCity].IsNull;
|
|
end;
|
|
|
|
procedure TCustomersDataTableRules.SetCityIsNull(const aValue: Boolean);
|
|
begin
|
|
if aValue then
|
|
DataTable.Fields[idx_CustomersCity].AsVariant := Null;
|
|
end;
|
|
|
|
function TCustomersDataTableRules.GetRegionValue: WideString;
|
|
begin
|
|
result := DataTable.Fields[idx_CustomersRegion].AsWideString;
|
|
end;
|
|
|
|
procedure TCustomersDataTableRules.SetRegionValue(const aValue: WideString);
|
|
begin
|
|
DataTable.Fields[idx_CustomersRegion].AsWideString := aValue;
|
|
end;
|
|
|
|
function TCustomersDataTableRules.GetRegionIsNull: boolean;
|
|
begin
|
|
result := DataTable.Fields[idx_CustomersRegion].IsNull;
|
|
end;
|
|
|
|
procedure TCustomersDataTableRules.SetRegionIsNull(const aValue: Boolean);
|
|
begin
|
|
if aValue then
|
|
DataTable.Fields[idx_CustomersRegion].AsVariant := Null;
|
|
end;
|
|
|
|
function TCustomersDataTableRules.GetPostalCodeValue: WideString;
|
|
begin
|
|
result := DataTable.Fields[idx_CustomersPostalCode].AsWideString;
|
|
end;
|
|
|
|
procedure TCustomersDataTableRules.SetPostalCodeValue(const aValue: WideString);
|
|
begin
|
|
DataTable.Fields[idx_CustomersPostalCode].AsWideString := aValue;
|
|
end;
|
|
|
|
function TCustomersDataTableRules.GetPostalCodeIsNull: boolean;
|
|
begin
|
|
result := DataTable.Fields[idx_CustomersPostalCode].IsNull;
|
|
end;
|
|
|
|
procedure TCustomersDataTableRules.SetPostalCodeIsNull(const aValue: Boolean);
|
|
begin
|
|
if aValue then
|
|
DataTable.Fields[idx_CustomersPostalCode].AsVariant := Null;
|
|
end;
|
|
|
|
function TCustomersDataTableRules.GetCountryValue: WideString;
|
|
begin
|
|
result := DataTable.Fields[idx_CustomersCountry].AsWideString;
|
|
end;
|
|
|
|
procedure TCustomersDataTableRules.SetCountryValue(const aValue: WideString);
|
|
begin
|
|
DataTable.Fields[idx_CustomersCountry].AsWideString := aValue;
|
|
end;
|
|
|
|
function TCustomersDataTableRules.GetCountryIsNull: boolean;
|
|
begin
|
|
result := DataTable.Fields[idx_CustomersCountry].IsNull;
|
|
end;
|
|
|
|
procedure TCustomersDataTableRules.SetCountryIsNull(const aValue: Boolean);
|
|
begin
|
|
if aValue then
|
|
DataTable.Fields[idx_CustomersCountry].AsVariant := Null;
|
|
end;
|
|
|
|
function TCustomersDataTableRules.GetPhoneValue: WideString;
|
|
begin
|
|
result := DataTable.Fields[idx_CustomersPhone].AsWideString;
|
|
end;
|
|
|
|
procedure TCustomersDataTableRules.SetPhoneValue(const aValue: WideString);
|
|
begin
|
|
DataTable.Fields[idx_CustomersPhone].AsWideString := aValue;
|
|
end;
|
|
|
|
function TCustomersDataTableRules.GetPhoneIsNull: boolean;
|
|
begin
|
|
result := DataTable.Fields[idx_CustomersPhone].IsNull;
|
|
end;
|
|
|
|
procedure TCustomersDataTableRules.SetPhoneIsNull(const aValue: Boolean);
|
|
begin
|
|
if aValue then
|
|
DataTable.Fields[idx_CustomersPhone].AsVariant := Null;
|
|
end;
|
|
|
|
function TCustomersDataTableRules.GetFaxValue: WideString;
|
|
begin
|
|
result := DataTable.Fields[idx_CustomersFax].AsWideString;
|
|
end;
|
|
|
|
procedure TCustomersDataTableRules.SetFaxValue(const aValue: WideString);
|
|
begin
|
|
DataTable.Fields[idx_CustomersFax].AsWideString := aValue;
|
|
end;
|
|
|
|
function TCustomersDataTableRules.GetFaxIsNull: boolean;
|
|
begin
|
|
result := DataTable.Fields[idx_CustomersFax].IsNull;
|
|
end;
|
|
|
|
procedure TCustomersDataTableRules.SetFaxIsNull(const aValue: Boolean);
|
|
begin
|
|
if aValue then
|
|
DataTable.Fields[idx_CustomersFax].AsVariant := Null;
|
|
end;
|
|
|
|
|
|
{ TOrdersDataTableRules }
|
|
constructor TOrdersDataTableRules.Create(aDataTable: TDADataTable);
|
|
begin
|
|
inherited;
|
|
end;
|
|
|
|
destructor TOrdersDataTableRules.Destroy;
|
|
begin
|
|
inherited;
|
|
end;
|
|
|
|
function TOrdersDataTableRules.GetOrderIDValue: Integer;
|
|
begin
|
|
result := DataTable.Fields[idx_OrdersOrderID].AsInteger;
|
|
end;
|
|
|
|
procedure TOrdersDataTableRules.SetOrderIDValue(const aValue: Integer);
|
|
begin
|
|
DataTable.Fields[idx_OrdersOrderID].AsInteger := aValue;
|
|
end;
|
|
|
|
function TOrdersDataTableRules.GetOrderIDIsNull: boolean;
|
|
begin
|
|
result := DataTable.Fields[idx_OrdersOrderID].IsNull;
|
|
end;
|
|
|
|
procedure TOrdersDataTableRules.SetOrderIDIsNull(const aValue: Boolean);
|
|
begin
|
|
if aValue then
|
|
DataTable.Fields[idx_OrdersOrderID].AsVariant := Null;
|
|
end;
|
|
|
|
function TOrdersDataTableRules.GetCustomerIDValue: WideString;
|
|
begin
|
|
result := DataTable.Fields[idx_OrdersCustomerID].AsWideString;
|
|
end;
|
|
|
|
procedure TOrdersDataTableRules.SetCustomerIDValue(const aValue: WideString);
|
|
begin
|
|
DataTable.Fields[idx_OrdersCustomerID].AsWideString := aValue;
|
|
end;
|
|
|
|
function TOrdersDataTableRules.GetCustomerIDIsNull: boolean;
|
|
begin
|
|
result := DataTable.Fields[idx_OrdersCustomerID].IsNull;
|
|
end;
|
|
|
|
procedure TOrdersDataTableRules.SetCustomerIDIsNull(const aValue: Boolean);
|
|
begin
|
|
if aValue then
|
|
DataTable.Fields[idx_OrdersCustomerID].AsVariant := Null;
|
|
end;
|
|
|
|
function TOrdersDataTableRules.GetEmployeeIDValue: Integer;
|
|
begin
|
|
result := DataTable.Fields[idx_OrdersEmployeeID].AsInteger;
|
|
end;
|
|
|
|
procedure TOrdersDataTableRules.SetEmployeeIDValue(const aValue: Integer);
|
|
begin
|
|
DataTable.Fields[idx_OrdersEmployeeID].AsInteger := aValue;
|
|
end;
|
|
|
|
function TOrdersDataTableRules.GetEmployeeIDIsNull: boolean;
|
|
begin
|
|
result := DataTable.Fields[idx_OrdersEmployeeID].IsNull;
|
|
end;
|
|
|
|
procedure TOrdersDataTableRules.SetEmployeeIDIsNull(const aValue: Boolean);
|
|
begin
|
|
if aValue then
|
|
DataTable.Fields[idx_OrdersEmployeeID].AsVariant := Null;
|
|
end;
|
|
|
|
function TOrdersDataTableRules.GetOrderDateValue: DateTime;
|
|
begin
|
|
result := DataTable.Fields[idx_OrdersOrderDate].AsDateTime;
|
|
end;
|
|
|
|
procedure TOrdersDataTableRules.SetOrderDateValue(const aValue: DateTime);
|
|
begin
|
|
DataTable.Fields[idx_OrdersOrderDate].AsDateTime := aValue;
|
|
end;
|
|
|
|
function TOrdersDataTableRules.GetOrderDateIsNull: boolean;
|
|
begin
|
|
result := DataTable.Fields[idx_OrdersOrderDate].IsNull;
|
|
end;
|
|
|
|
procedure TOrdersDataTableRules.SetOrderDateIsNull(const aValue: Boolean);
|
|
begin
|
|
if aValue then
|
|
DataTable.Fields[idx_OrdersOrderDate].AsVariant := Null;
|
|
end;
|
|
|
|
function TOrdersDataTableRules.GetRequiredDateValue: DateTime;
|
|
begin
|
|
result := DataTable.Fields[idx_OrdersRequiredDate].AsDateTime;
|
|
end;
|
|
|
|
procedure TOrdersDataTableRules.SetRequiredDateValue(const aValue: DateTime);
|
|
begin
|
|
DataTable.Fields[idx_OrdersRequiredDate].AsDateTime := aValue;
|
|
end;
|
|
|
|
function TOrdersDataTableRules.GetRequiredDateIsNull: boolean;
|
|
begin
|
|
result := DataTable.Fields[idx_OrdersRequiredDate].IsNull;
|
|
end;
|
|
|
|
procedure TOrdersDataTableRules.SetRequiredDateIsNull(const aValue: Boolean);
|
|
begin
|
|
if aValue then
|
|
DataTable.Fields[idx_OrdersRequiredDate].AsVariant := Null;
|
|
end;
|
|
|
|
function TOrdersDataTableRules.GetShippedDateValue: DateTime;
|
|
begin
|
|
result := DataTable.Fields[idx_OrdersShippedDate].AsDateTime;
|
|
end;
|
|
|
|
procedure TOrdersDataTableRules.SetShippedDateValue(const aValue: DateTime);
|
|
begin
|
|
DataTable.Fields[idx_OrdersShippedDate].AsDateTime := aValue;
|
|
end;
|
|
|
|
function TOrdersDataTableRules.GetShippedDateIsNull: boolean;
|
|
begin
|
|
result := DataTable.Fields[idx_OrdersShippedDate].IsNull;
|
|
end;
|
|
|
|
procedure TOrdersDataTableRules.SetShippedDateIsNull(const aValue: Boolean);
|
|
begin
|
|
if aValue then
|
|
DataTable.Fields[idx_OrdersShippedDate].AsVariant := Null;
|
|
end;
|
|
|
|
function TOrdersDataTableRules.GetShipViaValue: Integer;
|
|
begin
|
|
result := DataTable.Fields[idx_OrdersShipVia].AsInteger;
|
|
end;
|
|
|
|
procedure TOrdersDataTableRules.SetShipViaValue(const aValue: Integer);
|
|
begin
|
|
DataTable.Fields[idx_OrdersShipVia].AsInteger := aValue;
|
|
end;
|
|
|
|
function TOrdersDataTableRules.GetShipViaIsNull: boolean;
|
|
begin
|
|
result := DataTable.Fields[idx_OrdersShipVia].IsNull;
|
|
end;
|
|
|
|
procedure TOrdersDataTableRules.SetShipViaIsNull(const aValue: Boolean);
|
|
begin
|
|
if aValue then
|
|
DataTable.Fields[idx_OrdersShipVia].AsVariant := Null;
|
|
end;
|
|
|
|
function TOrdersDataTableRules.GetFreightValue: Float;
|
|
begin
|
|
result := DataTable.Fields[idx_OrdersFreight].AsFloat;
|
|
end;
|
|
|
|
procedure TOrdersDataTableRules.SetFreightValue(const aValue: Float);
|
|
begin
|
|
DataTable.Fields[idx_OrdersFreight].AsFloat := aValue;
|
|
end;
|
|
|
|
function TOrdersDataTableRules.GetFreightIsNull: boolean;
|
|
begin
|
|
result := DataTable.Fields[idx_OrdersFreight].IsNull;
|
|
end;
|
|
|
|
procedure TOrdersDataTableRules.SetFreightIsNull(const aValue: Boolean);
|
|
begin
|
|
if aValue then
|
|
DataTable.Fields[idx_OrdersFreight].AsVariant := Null;
|
|
end;
|
|
|
|
function TOrdersDataTableRules.GetShipNameValue: WideString;
|
|
begin
|
|
result := DataTable.Fields[idx_OrdersShipName].AsWideString;
|
|
end;
|
|
|
|
procedure TOrdersDataTableRules.SetShipNameValue(const aValue: WideString);
|
|
begin
|
|
DataTable.Fields[idx_OrdersShipName].AsWideString := aValue;
|
|
end;
|
|
|
|
function TOrdersDataTableRules.GetShipNameIsNull: boolean;
|
|
begin
|
|
result := DataTable.Fields[idx_OrdersShipName].IsNull;
|
|
end;
|
|
|
|
procedure TOrdersDataTableRules.SetShipNameIsNull(const aValue: Boolean);
|
|
begin
|
|
if aValue then
|
|
DataTable.Fields[idx_OrdersShipName].AsVariant := Null;
|
|
end;
|
|
|
|
function TOrdersDataTableRules.GetShipAddressValue: WideString;
|
|
begin
|
|
result := DataTable.Fields[idx_OrdersShipAddress].AsWideString;
|
|
end;
|
|
|
|
procedure TOrdersDataTableRules.SetShipAddressValue(const aValue: WideString);
|
|
begin
|
|
DataTable.Fields[idx_OrdersShipAddress].AsWideString := aValue;
|
|
end;
|
|
|
|
function TOrdersDataTableRules.GetShipAddressIsNull: boolean;
|
|
begin
|
|
result := DataTable.Fields[idx_OrdersShipAddress].IsNull;
|
|
end;
|
|
|
|
procedure TOrdersDataTableRules.SetShipAddressIsNull(const aValue: Boolean);
|
|
begin
|
|
if aValue then
|
|
DataTable.Fields[idx_OrdersShipAddress].AsVariant := Null;
|
|
end;
|
|
|
|
function TOrdersDataTableRules.GetShipCityValue: WideString;
|
|
begin
|
|
result := DataTable.Fields[idx_OrdersShipCity].AsWideString;
|
|
end;
|
|
|
|
procedure TOrdersDataTableRules.SetShipCityValue(const aValue: WideString);
|
|
begin
|
|
DataTable.Fields[idx_OrdersShipCity].AsWideString := aValue;
|
|
end;
|
|
|
|
function TOrdersDataTableRules.GetShipCityIsNull: boolean;
|
|
begin
|
|
result := DataTable.Fields[idx_OrdersShipCity].IsNull;
|
|
end;
|
|
|
|
procedure TOrdersDataTableRules.SetShipCityIsNull(const aValue: Boolean);
|
|
begin
|
|
if aValue then
|
|
DataTable.Fields[idx_OrdersShipCity].AsVariant := Null;
|
|
end;
|
|
|
|
function TOrdersDataTableRules.GetShipRegionValue: WideString;
|
|
begin
|
|
result := DataTable.Fields[idx_OrdersShipRegion].AsWideString;
|
|
end;
|
|
|
|
procedure TOrdersDataTableRules.SetShipRegionValue(const aValue: WideString);
|
|
begin
|
|
DataTable.Fields[idx_OrdersShipRegion].AsWideString := aValue;
|
|
end;
|
|
|
|
function TOrdersDataTableRules.GetShipRegionIsNull: boolean;
|
|
begin
|
|
result := DataTable.Fields[idx_OrdersShipRegion].IsNull;
|
|
end;
|
|
|
|
procedure TOrdersDataTableRules.SetShipRegionIsNull(const aValue: Boolean);
|
|
begin
|
|
if aValue then
|
|
DataTable.Fields[idx_OrdersShipRegion].AsVariant := Null;
|
|
end;
|
|
|
|
function TOrdersDataTableRules.GetShipPostalCodeValue: WideString;
|
|
begin
|
|
result := DataTable.Fields[idx_OrdersShipPostalCode].AsWideString;
|
|
end;
|
|
|
|
procedure TOrdersDataTableRules.SetShipPostalCodeValue(const aValue: WideString);
|
|
begin
|
|
DataTable.Fields[idx_OrdersShipPostalCode].AsWideString := aValue;
|
|
end;
|
|
|
|
function TOrdersDataTableRules.GetShipPostalCodeIsNull: boolean;
|
|
begin
|
|
result := DataTable.Fields[idx_OrdersShipPostalCode].IsNull;
|
|
end;
|
|
|
|
procedure TOrdersDataTableRules.SetShipPostalCodeIsNull(const aValue: Boolean);
|
|
begin
|
|
if aValue then
|
|
DataTable.Fields[idx_OrdersShipPostalCode].AsVariant := Null;
|
|
end;
|
|
|
|
function TOrdersDataTableRules.GetShipCountryValue: WideString;
|
|
begin
|
|
result := DataTable.Fields[idx_OrdersShipCountry].AsWideString;
|
|
end;
|
|
|
|
procedure TOrdersDataTableRules.SetShipCountryValue(const aValue: WideString);
|
|
begin
|
|
DataTable.Fields[idx_OrdersShipCountry].AsWideString := aValue;
|
|
end;
|
|
|
|
function TOrdersDataTableRules.GetShipCountryIsNull: boolean;
|
|
begin
|
|
result := DataTable.Fields[idx_OrdersShipCountry].IsNull;
|
|
end;
|
|
|
|
procedure TOrdersDataTableRules.SetShipCountryIsNull(const aValue: Boolean);
|
|
begin
|
|
if aValue then
|
|
DataTable.Fields[idx_OrdersShipCountry].AsVariant := Null;
|
|
end;
|
|
|
|
|
|
initialization
|
|
RegisterDataTableRules(RID_Customers, TCustomersDataTableRules);
|
|
RegisterDataTableRules(RID_Orders, TOrdersDataTableRules);
|
|
|
|
end.
|