NameSpace MyFileExtention Namespace IFCX Class BL_IFCX inherits businessLayer 'entry point to manage IFCX data private _IMPORT_ELEMENTS as IMPORT_ELEMENTS Public sub new(aIFCXFile as string) mybase.new(aIFCXFile) ' => mybase.File = aIFCXFile : _datalayer = new datalayer(_file) End sub Public sub Load() _IMPORT_ELEMENTS = new IMPORT_ELEMENTS(Datalayer) End sub End Class Class IMPORT_ELEMENT 'Item Class private ROW as datarow Public sub new(_row as datarow) ROW = _row end sub Property #PropertyName# as #PropertyType# get return ROW(#PropertyColumnNameMapped#) end get set (value as #propertyType#) ROW(#PropertyColumnNameMapped#) = Value end set end property END Class Class IMPORT_ELEMENTS inherits List(of IMPORT_ELEMENT 'List Class private _datalayer as datalayer Public sub new(aDataLayer as datalayer) _datalayer = adatalayer end sub public sub load() 'classic datatable/datarow loading dim dt as datatable = _datalayer.loadTable("IMPORT_ELEMENTS") ' => adapter.fill(...) for each _row in dt.rows me.add(new IMPORT_ELEMENT(_row) next End class End NameSpace NameSpace ESTX Class BL_ESTX inherits BusinessLayer 'Class to manage ESTX Data private withevents _BL_IFCX AS IFCX.BL_IFCX private _ASSIGNATIONS private _IFCX_File as string Public sub new(aESTXFile as string) Mybase.new(aESTXFile) ' => mybase.File = aESTXFile : mybase.dataLayer = new datalayer(aESTXFile) end sub Public sub Load() 'load properties ' => datalayer.loadTable("PROPERTIES") 'check for property IFCX_File to set or not inner class property that run or not BL_IFCX load process _ESTX_ITEMS = new ESTX_ITEMS(Datalayer) _ASSIGNATIONS = New ASSIGNATION(Datalayer) end sub Public property IFCX_File as string get return _IFCX_File end get set(value as string) If value<>"" and system.io.path.exist(value) then _IFCX_File = value _BL_IFCX = new IFCX.BL_IFCX(_IFCX_File) _BL_IFCX.load() End if end set end property private Readonly Property BL_IFCX as IFCX.BL_IFCX get return _BL_IFCX end get end property Public readonly property IMPORT_ELEMENTS as IFCX.IMPORT_ELEMENTS get Return _BL_IFCX?.IMPORT_ELEMENTS end get End property End Class Public Class ASSIGNATION ' relation between ESTX_ITEM and IFCX.IMPORT_ELEMENTS '... property ESTX_ITEM_ID as integer get return ROW("ESTX_ITEM_ID") get end set (value as integer) ROW("ESTX_ITEM_ID") = Value _ESTX_ITEM = Nothing end set end property Property IFCX_ITEM_ID as integer get return ROW("IFCX_ITEM_ID") end get set (value as integer) ROW("IFCX_ITEM_ID") = value _IFCX_ITEM = nothing end set end property End Class readonly Property ESTX_ITEM as ESTX_ITEM get if _ESTX_ITEM is nothing then raiseevent Ask_ESTX_ITEM(ESTX_ITEM_ID, _ESTX_ITEM) end if return _ESTX_ITEM end get end property readonly Property IFCX_ITEM as IFCX.IMPORT_ELEMENT get if _IFCX_ITEM is nothing then raiseevent Ask_IFCX_ITEM(IFCX_ITEM_ID, _IFCX_ITEM) end if return _IFCX_ITEM end get end property Public Class ASSIGNATIONS inherits list(of ASSIGNATION) End class Public Class ESTX_ITEM 'exist without IFCX_IMPORTELEMENT Public readonly property ASSIGNATIONS as List(of ASSIGNATION) get dim _list as List(of ASSIGNATION) raisevent Ask_ASSIGGNATION(ID, _list) return _list end get end property End Class Public Class ESTX_ITEMS inherits list(of ESTX_ITEM) End Class End NameSp
Extender Provider Objects