Using Visual Base Form classes
The SmartComponent Library provides visual base forms to be used as a foundation for various form types. These forms can be used by inheriting from them. Besides inherited functionality they provide a layout and contained controls.
These Visual Base Forms can be understood by customers as a template for creating your own visual base forms.
Class Name | Inherited from | Description |
---|---|---|
BaseForm | Simple Dialog Form (ShowDialog()) that includes an OK and Cancel Button with default settings. | |
Consultingwerk.SmartComponents.BaseForms.SmartBaseDialogForm | SmartWindowForm | SmartWindowForm based simple Dialog Form (ShowDialog()) that includes an OK and Cancel Button with default settings and provides SmartComponent Library extensions. |
Consultingwerk.SmartComponents.BaseForms.BusinessEntityAdapter.SmartSingleAdapterForm | SmartWindowForm | SmartWindowForm with one SmartBusinessEntityAdapter, one SmartDataBrowser and space for a SmartViewerControl. This Form is a functional starting point for creating simple master table maintenance forms. |
Consultingwerk.SmartComponents.BaseForms.BusinessEntityAdapter.SmartMasterDetailAdapterForm | SmartWindowForm | SmartWindowForm with one SmartBusinessEntityAdapter, one SmartDatasetChildAdapter, two SmartDataBrowser and space for two SmartViewerControls. This Form is a functional starting point for creating simple master/detail forms. |
SmartWindowForm for simple master table maintenance controls
To leverage the SmartSingleAdapterForm for creating Forms, create a Form an add code like this to the Constructor of the Form to initialize the Data Access and Grid columns:
/*------------------------------------------------------------------------------ Purpose: Constructor for the SimpleCustomerForm class Notes: ------------------------------------------------------------------------------*/ CONSTRUCTOR PUBLIC SimpleCustomerForm (): SUPER (). THIS-OBJECT:InitializeComponent() . THIS-OBJECT:smartBusinessEntityAdapter1:EntityName = "Consultingwerk.SmartComponentsDemo.OERA.Sports2000.CustomerBusinessEntity" . THIS-OBJECT:smartBusinessEntityAdapter1:EntityTable = "eCustomer" . THIS-OBJECT:smartBusinessEntityAdapter1:EntityView = "eSalesRep" . THIS-OBJECT:smartBusinessEntityAdapter1:EntityJoin = "Yes" . THIS-OBJECT:InitializeDataBinding () . THIS-OBJECT:smartDataBrowser1:VisibleGridColumns = "CustNum,Name,City" . THIS-OBJECT:SmartViewerControl = NEW Consultingwerk.SmartComponentsDemo.CustomerExplorer.Customer.CustomerViewerControl () . END CONSTRUCTOR.
SmartWindowForm for simple master/detail forms
To leverage the SmartMasterDetailAdapterForm for creating Forms, create a Form an add code like this to the Constructor of the Form to initialize the Data Access and Grid columns:
/*------------------------------------------------------------------------------ Purpose: Constructor for the SimpleOrderForm class Notes: ------------------------------------------------------------------------------*/ CONSTRUCTOR PUBLIC SimpleOrderForm (): SUPER (). THIS-OBJECT:InitializeComponent() . THIS-OBJECT:smartBusinessEntityAdapter1:EntityName = "Consultingwerk.SmartComponentsDemo.OERA.Sports2000.OrderBusinessEntity" . THIS-OBJECT:smartBusinessEntityAdapter1:EntityTable = "eOrder" . THIS-OBJECT:smartBusinessEntityAdapter1:EntityView = "eOrderLine,eItem" . THIS-OBJECT:smartDatasetChildAdapter1:EntityTable = "eOrderLine" . THIS-OBJECT:smartDatasetChildAdapter1:EntityView = "eItem" . THIS-OBJECT:InitializeDataBinding () . THIS-OBJECT:smartDataBrowser1:VisibleGridColumns = "OrderNum,OrderDate" . THIS-OBJECT:MasterViewerControl = NEW Consultingwerk.SmartComponentsDemo.CustomerExplorer.Order.OrderViewerControl () . THIS-OBJECT:DetailViewerControl = NEW Consultingwerk.SmartComponentsDemo.CustomerExplorer.Order.OrderLineViewerControl () . END CONSTRUCTOR.