Database Reference
In-Depth Information
buttons, and many other controls. he application developer can drag these controls from the
Toolbox to Forms Designer. he code units implementing these controls are included in the .NET
Framework class library. Once all of the controls are added, the application developer can change
properties of the controls such as changing a control's name or size. he application developer
needs to specify the data source for some of the controls if these controls need to present data
extracted from a database. he application developer also needs to add code for implementing
actions triggered by a control such as the command button.
he development process starts with dragging the controls from the Toolbox to the Designer
pane. Position these controls according to the design shown in Figure 9.3. Figure 9.4 presents the
GUI design of the Class Schedule Management form implemented with Visual Studio.
he next step is to name the controls shown in Figure 9.4 and then set the properties for these
controls. Table 9.4 gives the names of the controls and the properties conigured for these controls.
After the GUI is implemented, your next task is to implement the actions with a programming
language. In this chapter, C# is the programming language to be used. As shown in Figure 9.4,
the event will be generated by clicking the Select button, and the Update, Delete, or New links.
he FormView also includes two other links Insert and Cancel. C# provides the built-in methods
to handle these events. Table 9.5 lists the methods to be used for the Class Schedule Management
form.
As seen in Table 9.5, most of the actions are handled by the built-in methods. he methods
provided by C# take care of the data source connection. hey update the data source according to
which the link has been clicked. hey also maintain the relationship between the GridView and
FormView. he main coding task for the application developer is to write the code to update the
message of the Status label. On the data source side, the database administrator needs to prepare
a data set used as the input of the GridView. For the GridView and FormView controls, we may
need to add some SQL statements to carry out tasks such as update, delete, and insert data into the
Figure 9.4
GUI design in visual studio.
Search WWH ::




Custom Search