03 | private string _firstName; |
04 | private string _lastName; |
05 | private string _email; |
07 | public string FirstName |
09 | get { return _firstName; } |
10 | set { _firstName = value; } |
13 | public string LastName |
15 | get { return _lastName; } |
16 | set { _lastName = value; } |
19 | public string FullName |
21 | get { return _firstName + " " + _lastName; } |
26 | get { return _email; } |
27 | set { _email = value; } |
------------------------------------------------
//DataGrid1.DataSource=GetCustomers();
// DataGrid1.DataBind();
DataTable dt=new DataTable();
dt=
GetCustomers();
-------------------------------------------------
09 | private List<Customer> GetCustomers() |
11 | List<Customer> customers = new List<Customer>(); |
13 | for ( int i = 1; i <= 20; i++) |
15 | Customer customer = new Customer(); |
16 | customer.FirstName = "FirstName" + i; |
17 | customer.LastName = "LastName" + i; |
18 | customer.Email = "Email" + i; |
19 | customers.Add(customer); |
No comments:
Post a Comment