// CodeGear C++Builder
// Copyright (c) 1995, 2021 by Embarcadero Technologies, Inc.
// All rights reserved

// (DO NOT EDIT: machine generated header) 'ABSFldLinks.pas' rev: 35.00 (Windows)

#ifndef AbsfldlinksHPP
#define AbsfldlinksHPP

#pragma delphiheader begin
#pragma option push
#pragma option -w-      // All warnings off
#pragma option -Vx      // Zero-length empty class member 
#pragma pack(push,8)
#include <System.hpp>
#include <SysInit.hpp>
#include <System.SysUtils.hpp>
#include <Winapi.Windows.hpp>
#include <Winapi.Messages.hpp>
#include <System.Classes.hpp>
#include <Vcl.Graphics.hpp>
#include <Vcl.Controls.hpp>
#include <Vcl.Forms.hpp>
#include <Vcl.StdCtrls.hpp>
#include <Vcl.ExtCtrls.hpp>
#include <Data.DB.hpp>
#include <Vcl.Buttons.hpp>
#include <ABSExcept.hpp>
#include <ABSConst.hpp>
#include <DesignIntf.hpp>
#include <DesignEditors.hpp>

//-- user supplied -----------------------------------------------------------

namespace Absfldlinks
{
//-- forward type declarations -----------------------------------------------
class DELPHICLASS TABSBaseFieldLinkProperty;
class DELPHICLASS TABSLinkFields;
//-- type declarations -------------------------------------------------------
#pragma pack(push,4)
class PASCALIMPLEMENTATION TABSBaseFieldLinkProperty : public Designeditors::TStringProperty
{
	typedef Designeditors::TStringProperty inherited;
	
private:
	bool FChanged;
	Data::Db::TDataSet* FDataSet;
	
protected:
	Data::Db::TDataSet* __fastcall GetDataSet();
	virtual void __fastcall GetFieldNamesForIndex(System::Classes::TStrings* List);
	virtual bool __fastcall GetIndexBased();
	virtual Data::Db::TIndexDefs* __fastcall GetIndexDefs();
	virtual System::AnsiString __fastcall GetIndexFieldNames();
	virtual System::AnsiString __fastcall GetIndexName();
	virtual System::AnsiString __fastcall GetMasterFields() = 0 ;
	virtual void __fastcall SetIndexFieldNames(const System::AnsiString Value);
	virtual void __fastcall SetIndexName(const System::AnsiString Value);
	virtual void __fastcall SetMasterFields(const System::AnsiString Value) = 0 ;
	
public:
	__fastcall virtual TABSBaseFieldLinkProperty(Data::Db::TDataSet* ADataSet);
	void __fastcall GetIndexNames(System::Classes::TStrings* List);
	__property bool IndexBased = {read=GetIndexBased, nodefault};
	__property Data::Db::TIndexDefs* IndexDefs = {read=GetIndexDefs};
	__property System::AnsiString IndexFieldNames = {read=GetIndexFieldNames, write=SetIndexFieldNames};
	__property System::AnsiString IndexName = {read=GetIndexName, write=SetIndexName};
	__property System::AnsiString MasterFields = {read=GetMasterFields, write=SetMasterFields};
	__property bool Changed = {read=FChanged, nodefault};
	virtual void __fastcall Edit();
	virtual Designintf::TPropertyAttributes __fastcall GetAttributes();
	__property Data::Db::TDataSet* DataSet = {read=GetDataSet};
public:
	/* TPropertyEditor.Create */ inline __fastcall virtual TABSBaseFieldLinkProperty(const Designintf::_di_IDesigner ADesigner, int APropCount) : Designeditors::TStringProperty(ADesigner, APropCount) { }
	/* TPropertyEditor.Destroy */ inline __fastcall virtual ~TABSBaseFieldLinkProperty() { }
	
};

#pragma pack(pop)

class PASCALIMPLEMENTATION TABSLinkFields : public Vcl::Forms::TForm
{
	typedef Vcl::Forms::TForm inherited;
	
__published:
	Vcl::Stdctrls::TListBox* DetailList;
	Vcl::Stdctrls::TListBox* MasterList;
	Vcl::Stdctrls::TListBox* BindList;
	Vcl::Stdctrls::TLabel* Label30;
	Vcl::Stdctrls::TLabel* Label31;
	Vcl::Stdctrls::TComboBox* IndexList;
	Vcl::Stdctrls::TLabel* IndexLabel;
	Vcl::Stdctrls::TLabel* Label2;
	Vcl::Extctrls::TBevel* Bevel1;
	Vcl::Extctrls::TBevel* Bevel2;
	Vcl::Stdctrls::TButton* AddButton;
	Vcl::Stdctrls::TButton* DeleteButton;
	Vcl::Stdctrls::TButton* ClearButton;
	Vcl::Stdctrls::TButton* Button1;
	Vcl::Stdctrls::TButton* Button2;
	Vcl::Stdctrls::TButton* Help;
	void __fastcall FormCreate(System::TObject* Sender);
	void __fastcall BindingListClick(System::TObject* Sender);
	void __fastcall AddButtonClick(System::TObject* Sender);
	void __fastcall DeleteButtonClick(System::TObject* Sender);
	void __fastcall BindListClick(System::TObject* Sender);
	void __fastcall ClearButtonClick(System::TObject* Sender);
	void __fastcall FormDestroy(System::TObject* Sender);
	void __fastcall BitBtn1Click(System::TObject* Sender);
	void __fastcall HelpClick(System::TObject* Sender);
	void __fastcall IndexListChange(System::TObject* Sender);
	
private:
	Data::Db::TDataSet* FDataSet;
	Data::Db::TDataSet* FMasterDataSet;
	TABSBaseFieldLinkProperty* FDataSetProxy;
	System::AnsiString FFullIndexName;
	System::AnsiString MasterFieldList;
	System::AnsiString IndexFieldList;
	System::Classes::TStringList* OrderedDetailList;
	System::Classes::TStringList* OrderedMasterList;
	void __fastcall OrderFieldList(System::Classes::TStrings* OrderedList, System::Classes::TStrings* List);
	void __fastcall AddToBindList(const System::AnsiString Str1, const System::AnsiString Str2);
	void __fastcall Initialize();
	__property System::AnsiString FullIndexName = {read=FFullIndexName};
	void __fastcall SetDataSet(Data::Db::TDataSet* Value);
	
public:
	__property Data::Db::TDataSet* DataSet = {read=FDataSet, write=SetDataSet};
	__property TABSBaseFieldLinkProperty* DataSetProxy = {read=FDataSetProxy, write=FDataSetProxy};
	bool __fastcall Edit();
public:
	/* TCustomForm.Create */ inline __fastcall virtual TABSLinkFields(System::Classes::TComponent* AOwner) : Vcl::Forms::TForm(AOwner) { }
	/* TCustomForm.CreateNew */ inline __fastcall virtual TABSLinkFields(System::Classes::TComponent* AOwner, int Dummy) : Vcl::Forms::TForm(AOwner, Dummy) { }
	/* TCustomForm.Destroy */ inline __fastcall virtual ~TABSLinkFields() { }
	
public:
	/* TWinControl.CreateParented */ inline __fastcall TABSLinkFields(HWND ParentWindow) : Vcl::Forms::TForm(ParentWindow) { }
	
};


//-- var, const, procedure ---------------------------------------------------
extern DELPHI_PACKAGE bool __fastcall EditMasterFields(Data::Db::TDataSet* ADataSet, TABSBaseFieldLinkProperty* ADataSetProxy);
}	/* namespace Absfldlinks */
#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_ABSFLDLINKS)
using namespace Absfldlinks;
#endif
#pragma pack(pop)
#pragma option pop

#pragma delphiheader end.
//-- end unit ----------------------------------------------------------------
#endif	// AbsfldlinksHPP
