NET
[ 10 ]
}
public DateTime JoiningDate
{
get
{
return joiningDate;
}
set
{
joiningDate = value;
}
}
}
We will use the fields basic and Salary interchangeably throughout
this book. You will find some code examples that refer to the former and
some that refer to the later. In either case, you can use the same Employee
class as the BusinessEntity with a minor change, that is, replace the name
of the public property called basic with Salary depending on whether
you need to use basic or Salary as the column for displaying data. So,
if you would like to use Salary as the name of the column data bound
to a data control, just change the public property called basic shown
as follows:
public double Salary
{
get
{
return basic;
}
set
{
basic = value;
}
}
To execute the programs listed in this book, ensure that the field names
used in the DataManager is the same as the field names that you have
used in the database table. We will revisit the Employee class in Chapter 5
of this book to incorporate some more variable and properties.
Chapter 1
[ 11 ]
The DataManager class contains a set of methods that return data that would be used
in the presentation layer of the application. The source code for the DataManager
class is as follows:
public class DataManager
{
ArrayList data = new ArrayList();
String connectionString = String.
Pages:
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31