Start PageShort introduction to smartDBforms.NET
Products FormProducts table form. Demonstrates: - Foreign key relation - SmartDBLabel - SmartDBLinkedLabel - custom error handling - navigation drop-down list - two-way databinding - linking to another form - ad hoc properties
Employees FormDisplays and edits the Employees database table. Image upload, large text, foreign-key columns,date editing popup calendar. Demonstrates the Clone command button. Localization in Spanish.
SuppliersInteracting with GridView. Placing SmartDBControl in TabStrip MultiView. EmptyDataTemplate template. Using MonitorParameters property.
Region FormSimple example for the Region table. Shows the basic elements of smartDBforms.NET. Standard paging.
Search ExampleDemonstrates: Search form for SelectParameters, wild character, EmptyDataTemplate property, DropDown pager style, hyperlinks as command buttons
ASP.NET AJAXShows how to use smartDBforms.NET with ASP.NET AJAX.
Category FormTable layout, image upload, large text, html editor,custom paging, custom error handling, disable edit insert, id of inserted items, default insert values
|
Displays and edits the Employees database table. Image upload, large text, foreign-key columns,date editing popup calendar. Demonstrates the Clone command button. Localization in Spanish.
A drop-down list at the top is prefilled with all available employees. The SmartDBView
form displays the details for the currently selected employee. Initially the data
is displayed in ReadOnly mode, but the user can select the “Edit” or “New” buttons
to switch between other form modes.
The Photo column is of type 'image' which is represented as byte[] in ADO.NET. A
FileUpload server control is automatically generated for this column when the form
is displayed in edit mode.
The ReportsTo column is a foreign-key self referencing the same table – Employees.
The BirthDate and HireDate columns are of type datetime. In edit mode they a javascript
popup calendar allows the user to select the date. A special database trigger is defined for
BirthDate that checks that the entered values are in the past. This is validated
by ValidateCustomEvent sent by the BirthDate SmartDBControl.
Demonstrates the Clone/Copy command button. The Clone buttons allows creating a
new database record by using the data of the current database record.
Demonstrates localization in Spanish. From the top drop-down list select the desired culture and the page will automatically be translated. Along with the translation, the values are formatted
according to the rules of the selected culture. You will notice that the calendar rearranges the days of the week and also translates them accordingly.
CREATE TABLE [dbo].[Employees](
[EmployeeID] [int] IDENTITY(1,1) NOT NULL,
[LastName] [nvarchar](20) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[FirstName] [nvarchar](10) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[Title] [nvarchar](30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[TitleOfCourtesy] [nvarchar](25) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[BirthDate] [datetime] NULL,
[HireDate] [datetime] NULL,
[Address] [nvarchar](60) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[City] [nvarchar](15) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Region] [nvarchar](15) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[PostalCode] [nvarchar](10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Country] [nvarchar](15) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[HomePhone] [nvarchar](24) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Extension] [nvarchar](4) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Photo] [image] NULL,
[Notes] [ntext] COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[ReportsTo] [int] NULL,
[PhotoPath] [nvarchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
CONSTRAINT [PK_Employees] PRIMARY KEY CLUSTERED
(
[EmployeeID] ASC
)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
ALTER TABLE [dbo].[Employees] WITH NOCHECK ADD CONSTRAINT [FK_Employees_Employees]
FOREIGN KEY([ReportsTo])
REFERENCES [dbo].[Employees] ([EmployeeID])
GO
ALTER TABLE [dbo].[Employees] CHECK CONSTRAINT [FK_Employees_Employees]
GO
ALTER TABLE [dbo].[Employees] WITH NOCHECK ADD CONSTRAINT [CK_Birthdate]
CHECK (([BirthDate] < getdate()))
GO
ALTER TABLE [dbo].[Employees] CHECK CONSTRAINT [CK_Birthdate]
|