. . 3 : (, , , , ), (, , , , , ), (, , , ). , , . , , .
. .
- Windows hospital
- , Data->Add New Data Source.
- (.1). DataBase Next.
.1
- New Connection. (.2).
.2
- Connection properties Database hospital Create. (.3).
.3
- , .
- . , . Yes.
- (.2), .sdf
- , Test connection. (. 4). , .
.4
- Add connection
- (.1).
- Next, (.5). , .
.5
- . , New connection connection properties create (.3) Browse. . , .
- (.2), . .
- . Next. VS(.6). .
.6
- Next .
- Solution Explorer hospital.sdf. . Server Explorer (.7)
.7
- , , . .
- . Create table. (.8).
|
|
.8
- . . . .
- 3 .
- . . . Table properties. , Add relations (.9)
- relation name .
- Primary Key Table , .
- Foreign Key Table Column ( ).
- Add Columns. Add relation
- Add Relation. , .
- . . Manage Relations
- .
- Show table data. (.10).
.9
.10
- .
- . . , .
- . hospitalDataSet.xsd. .
- TableAdapter. . , Add-> TableAdapter. (.11).
- Next , (.12).
- Query Builder. (.13). . Close.
.11
.12
.13
- , , , , , . . Execute Query. . .
- . . TableAdapter . . .
- DataGridView. ( Data).
- , (.14)
.14
- Choose Data Source . , , , .
- (.15). , . hospitalDataSet , dataTable1BindingSource , dataTable1TableAdapter .
|
|
.15
- . (.16).
.16
- . . .
- DataGridView, Edit Columns. (.17).
- ( ) HeaderText .
- .
.17
- . , . , , .
- . . (.18)
.18
. .