close

Вход

Забыли?

вход по аккаунту

?

Отчет практ

код для вставкиСкачать
 ????????
????????, ?????? ??????????? ???????, ??????? ? ???? ?? ????????, ? ??? ????? ??????? ?????, ???? ?? ??? ? ????? ??????????? ? ????????? ??????? ?????????? ??? ????????? ??? ?????????? ?????????????. ? ????? ?????? ???????? ? ?????????? ??????????? ???????? ????? ??? ??? ????????? ????????? ? ???? ?? ?????????????? ?????????????????? ?????????, ???????????? ???????? ???????????? ?????????????. ??? ?????????????? ???????????? ???? ??????????? ? ??????????? ???????? ?????? ??????? ??????? ??????????? ????????? ????????? ?????? ???? ????????? ??????????????? ? ????????????????. ?????????????, ??? ?????? ????????????? ????? ????? ?? ?????????, ????? ????? ?? ???????? ??????????? ?????? ??????????? ? ?? ????????? ?????? ??????? ????????? ???????????, ??????? ?? ????????? ????????????? ??? ??? ???? ?????????. ?????? ??? ?????????? ???? ???????? ????????????? ? ?????????? ?????? ? ????????? ? ??????????? ??? ?????????.
?????? ?????? ??????? ?? ??????? ??????. ?????? ????? ?????? ????????? ?????? ? ????????????? ?????????? ???????. ?? ?????? ????? ??????????? ??? ???????????????? ?????????? ????????? ?????? ?????????? ????????????? ? ?????????????? ??????. ? ??????? ????? ?? ?????? ?????????????? ?????? ??????????????? ?????????????? ?????? ??, ?????????????????? ??? ???????????? ???? ? ?????? ????. ????????? ????? - ?????????????? ??????????????: ??????????? ????? ????????, ??????????? ??? ???????????????? ?????????? ????????? ??????, ????? ? ?????? ?? ?????????? ?????????????. ?????????? ???????? ?????????? ?????????.
1. ???????? ?????????? ???????
???????? ???????? ????? ?????????? ???????? ??????????? ????? ??????? ????????????? ?????????? ?? ?????? ????????? ? ??????? ????????? ?????????????. ????????????? ???????????? ?????????? - ????????? ?? ???????? ???????????? ????, ??????? ????????? ????? ?????? ?? ????????? ??????? ? ?????????? ???????? ???? ??? ?????????? ? ??? ?????????. ???????? ???? (?????) ???????? ???????? ?????????? ??????? ??????????, ? ??????? ??????????? ???????????? ????????? ??????????? ????????????? ? ?? ?????????.
? ????????? ????????? ????????????? ????? ??????? ??????????, ??????? ??????? ? ???? ?????? ? ??????????? ??????????????? ????????? ? ??????? ?????????????, ?? ????????? ??????? ? ???????????? ?????.
???????? ???????? ???? ? ??? ?????????? ???????, ??????????? ??? ??? ?? 100% ?????, ? ?? ?? ?????? ?????????? ???????? ?????. ???????? ????? ??????????????? ?? ????????????? ????????? ????????????? ? ?? ???????????? ??????????? ??????????.
???? ?????????? ???????? ??????, ??????? ??????????, ?????????????? ? ???????????? ??? ??????????? ??????????? ????????????????? ????????.
1.1. ?????????? ? ??????
??????????
? ???????? ??????? ????????? ???????????? ???????????, ????????????? ????? ???????? ???????? ? ?????. ?????? ???????? ?????? ???? ????????? ?????????? ? ??????????? ???????????????: ????, ??????? ????, ???? ? ?.?.
??????????? ?????
????? ?????????? ?????? ?? ????????? ? ??????? ??????????? ??????, ????????????????? ?????????? ??????????????? ? ????????. ??? ?????? ????? ????????? ???????? ? ???????, ???????, ??????? ??????????? ????????? ???????????, ?????? ?????????? ? ??? ??? ??????????? ?????????????.
??????
? ???? ????????? ???????? ?????????? ? ?????????? ??????? ???, ???????????? ? ????????. ??????? ?????? ??? ????????? ? ???? ?????? ????????????? ?????????? ????????????????? ?????, ? ????? ???????? ???????? ????? ??????????, ??? ?????, ???, ???????, ????.
????????
?????????? ?????????? ?????????? ????? ?????????? ?????? ??? ???? ?????? ??????????????? ??????????? ?????????, ????????? ? ???????????? ????????. ????? ???? ?????????? ????? ???????? ?????????: ?????????????, ??????, ?????????, ???, ???????????? ??????????, ???? ? ?.?.
?????? ???? ????? ?????? ??????????? ???????????? ?????? ??????????, ?????? ?? ???????? ?????, ???? ??????? ? ??????? ????????????? ????????? ? ?????. ?????? ??????? ????????????? ???? ?????????? ?????. ????? ??????? ?????????????? ????????????? ?????????? ? ???????? ?????????????.
1.2. ?????????? ? ???????????
???? ??????????? ??????????, ?????????? ????????? ??????, ??????????? ??? ?????????? ???????????? ????????????. ?????? ?????????? ??????? ? ??????????? ?????????.
?????????? ?. ???????? ? ????????????? ??????? ?? ?????????? ? ???????????.
?????????? B. ???????? ? ????????????? ??????? ?? ?????????? ? ??????????? ??????.
?????????? C. ???????? ? ????????????? ??????? ?? ?????????? ? ??????? ??????????? ??????.
?????????? D. ???????? ? ????????????? ??????? ?? ?????????? ? ?????????.
?????????? ?. ????????????? ???????: ????? ???????????? ?????????? ?? ????????? ?????????? ?????????? ? ?????? ? ????????????? ?????????????.
?????????? F. ???????? ? ????? ?? ??????? ???????? ?????, ?????????? ????????? ?????????????.
?????????? G. ???????????? ?????? ???????.
?????????? H. ????? ? ????? ?????????? ? ???????? ?? ???????? ????????????? ??????????.
2. ?????????????? ??????????????
2.1. ??????????? ????????? ? ?? ?????????
?????? ?? ?????????????? ? ???????? ?????????? ??????? ??????, ????????? ??? ????????????? ???????? ???????????? ??????? ???????? ?????? ?????????? ER-??????? ????? ???????? ??? ??????????? ????????? ?????? ? ?? ??????????. ?????????? ?????????? ???????? ?????? ? ?? ??????????:
1. ?????????? (????????, ???????? ???????, ????, ??????? ????, ??? L2, ??? L1, ??????, ??????????, ????).
2. ??????????? ????? (???????? ??????, ?????? ??????????, ??????, ??????? ????, ??? ??????, ???????? ???? AGP, ?????? ?????, ?????????? ???????? ???????, ????).
3. ?????? (????????, ???, ?????, ??????? ??????, ????).
4. ???????? (??????, ?????????, ??? ????????, ???????????? ??????????, ????????????? ??????????, ???????????? ??????????, ????)
5. ?????? ???? (? ???????, ??????? ??????????, ???? ???????, ?????????, ???. ?????, ??????, ???????, ?????).
??? ?????, ? ?????? ??????? ???????? ????????? ?????? ????? ????? ???????? ??????? ????? (?? 50 ????????), ??? ????? ???????? ? ?????????????? ?????????? ?????? ?????????????? ???? ? ?????????? ?????? ??? ?????????? ??????. ??????? ?????? ? ?????? ??????? ???? "ID", ??????? ????? ???????? ????????? ?????? ? ????????? ???????????????? ?????? ?????? ???????. ??? ???????? ????? ?????????? ???????????? ? ????? "????????", ??? ????????? ??? ???????? ??????????? ???????????.
2.2. ??????????? ???????????
???????? "??????????"
* ??????? "ID" - ????? ????? ?? 1 ?? 2 147 483 648. ???????? ??? ?????? ??????.
* ??????? "????????" - ?????????? ???????? ???????? 30 ????????. ?????????? ??? ??????????. ??????????? ?? ???????????? ???.
* ??????? "???????? ???????" - ????????????? ???????? ???????? - ?????????? ? ??????????. ?????????? ??? ??????????. * ??????? "????" - ?????????? ???????? ???????? 20 ????????.
* ??????? "??????? ????" - ????????????? ???????? ???????? ? ??????????. ?????????? ??? ??????????.
* ??????? "??? L2" - ????????????? ???????? ???????? - ?????????? ? ??????????.
* ??????? "??? L1" - ????????????? ???????? ???????? - ?????????? ? ??????????.
* ??????? "??????" - ?????????? ???????? ???????? 20 ????????. ?????????? ??? ??????????.
* ??????? "??????????" - ????????????? ???????? ???????? ?? 1 ????? ? ????? ? 2 ?????? ? ??????? ????? - ?????????? ? ???????????.
* ??????? "????" - ???????? ????????? ?? 8 ?????? ? ????? ? 2 ?????? ? ??????? ????? - ???????? ???????. ?????? ????????????. ?????????? ??? ??????????.
???????? "???. ?????"
* ??????? "ID" - ????? ????? ?? 1 ?? 2 147 483 648. ???????? ??? ?????? ??????.
* ??????? "???????? ??????" - ?????????? ???????? ???????? 30 ????????. ?????????? ??? ??????????. * ??????? "??????" - ?????????? ???????? ???????? 20 ????????. ?????????? ??? ??????????. ??????????? ?? ???????????? ???. ????????????? ???????? "??????" ? ???????? "??????????".
* ??????? "??????" - ?????????? ???????? ???????? 20 ????????.
* ??????? "??????? ????" - ????????????? ???????? ???????? ? ??????????.
* ??????? "??? ??????" - ????????????? ???????, ?????????? ?????????? ???????? ???????? 10 ????????. ?????????? ??? ??????????.
* ??????? "AGP" - ????????????? ???????? ???????? ?? 1 ????? ? ????? ?????. * ??????? "??????" - ?????????? ???????? ???????? 10 ????????.
* ??????? "????" - ?????????? ???????? ???????? 30 ????????.
* ??????? "????" - ???????? ????????? ?? 8 ?????? ? ????? ? 2 ?????? ? ??????? ????? - ???????? ???????. ?????? ????????????. ?????????? ??? ??????????.
???????? "??????"
* ??????? "ID" - ????? ????? ?? 1 ?? 2 147 483 648. ???????? ??? ?????? ??????.
* ??????? "????????" - ?????????? ???????? ???????? 50 ????????. ?????????? ??? ??????????.
* ??????? "???" - ?????????? ???????? ???????? 10 ????????. ?????????? ??? ??????????. ??????????? ?? ???????????? ???.
* ??????? "?????" - ????????????? ???????? ???????? - ?????????? ? ??????????. ?????????? ??? ??????????. * ??????? "???????" - ????????????? ???????? ???????? ? ??????????. ?????????? ??? ??????????. * ??????? "????" - ???????? ????????? ?? 8 ?????? ? ????? ? 2 ?????? ? ??????? ????? - ???????? ???????. ?????? ????????????. ?????????? ??? ??????????.
???????? "????????"
* ??????? "ID" - ????? ????? ?? 1 ?? 2 147 483 648. ???????? ??? ?????? ??????.
* ??????? "???????? ??????" - ?????????? ???????? ???????? 50 ????????. ?????????? ??? ??????????. ??????????? ?? ???????????? ???.
* ??????? "?????????" - ????????????? ???????? ???????? ? ??????. * ??????? "???" - ?????????? ???????? ???????? 10 ????????. * ??????? "???????????? ??????????" - ?????????? ???????? ???????? 15 ????????.
* ??????? "????????????? ??????????" - ?????????? ???????? ???????? 15 ????????.
* ??????? "?????????" - ????????????? ???????, ?????????? ?????????? ???????? ???????? 10 ????????.
* ??????? "????" - ???????? ????????? ?? 8 ?????? ? ????? ? 2 ?????? ? ??????? ????? - ???????? ???????. ?????? ????????????. ?????????? ??? ??????????.
???????? "?????? ????"
* ??????? "? ???????" - ????????????? ???????? ????????. ??????????? ?? ????????? ? ????????????.
* ??????? "???? ???????" - ???????? ???? "????". ?????????? ??? ??????????.
* ??????? "??????????" - ?????????? ???????? ???????? 30 ????????.
* ??????? "?????????" - ???????? ????????, ???????? ????????????? ?????????? ??????????.
* ??????? "??? ?????" - ???????? ????????, ???????? ????????????? ????????? ?????.
* ??????? "??????" - ???????? ????????, ???????? ????????????? ?????????? ?????? ??????.
* ??????? "???????" - ???????? ????????, ???????? ????????????? ?????????? ????????.
* ??????? "?????" - ???????? ????????? ?? 8 ?????? ? ????? ? 2 ?????? ? ??????? ????? - ???????? ???????. ?????? ????????????. ?????????? ??? ??????????.
2.3. ????? ?????? ????? ??????????
??????? 1- ????? ?????? ????? ??????????
??? ??? ???? ??????? ? ???????? ?????????? ???????, ???????? ???????? ???????????????? ?????????? ???????? ??????????? ????? ??????? ????????????? ?????????? ?? ?????? ????????? ? ??????? ????????? ????????????? ? ???????? ??????????????? ?????????? ?? ???? ?????????????. ??? ???????? ?????????????? ??????????? ER-???????.
????? "?????-??-??????" ? ??? ????????? "????????? - ???. ?????" ? "???. ????? - ??????" ??????????? ???????? ??????? ??????????????? ?????? ????? ?????????? ??????????????? ???? ?????????. ? ?????????, ????????????? ?????????? ????????????? ?????? ????????? ??????????? ????? ? ????????, ??? ????????? ??????????? ????? ???????? ?????? ?? ??? ????????? ? ??????? ??????????, ? ?????? ?? ?????. ??????????? ??????? ?????????????? ??????????? ? ???? ????????? "???. ????? - ??????". ????????? ????? ????? ???????????? ????????, ?.?. ????????????, ?????? ????????????? ?????????, ?????? ???? ?? 100% ??????, ??? ??? ???? ???????? ?????????? ??????????? ????? ? ?????? ? ????????.
???????? "?????? ????" ???????? ?????? ? ????????? ????????????? ????????????? ? ?????? ?????? ???????. ?????? ??? ????? ????? ???? ?????? ?????? ???? ????????? ?????? ????????. ????? ?????????????? ? ????? ???????, ?.?. ????????, ?????-???? ????????? ??????????? ?????? ???? ? ?????, ?? ???????? ?????? ????????? ????? ?? ????? ???????????????? ??? ?????????? ? ???????? "?????? ????".
??? ??? ????? ???????? ????????? ?? ??????? ?? ?????? ??????????, ????? ??? ??????, ?? ???????? "???????" ??????? ???? ????????? "?????? ????".
2.4. ?????????????? ?????????????? ???????
1. ???????? ????????? ? ?????????????? ?????????? ??? ????????? ??? ? ?????
2. ???????? ????????? ? ?????????????? ??????????? ?????, ??????????????? ????? ?????????? ??????????, ??? ????????? ?? ? ?????
3. ???????? ????????? ? ?????????????? ?????? ??????, ???????????????? ????? ????????? ??????????? ?????, ??? ????????? ??? ? ?????
4. ???????? ????????? ? ?????????????? ???????? ??? ????????? ??? ? ?????
5. ???????? ????? ????? ???????
6. ???????? ???????? ?????
7. ?????????? ???????? ?????
8. ???????? ?????? ?? ????????? ????????????? 9. ???????? ?????? ? ????? ????????? ????????, ??????????????? ???????????? ????????
10. ????????? ??????? ? ?????????
3. ?????????????? ??????????????
3.1. ????????? ????????? ??????
????? ???? ??? ???? ??????????? ?????????????? ?????? ?????????? ???????, ????? ?????????? ? ?????????? ?????????????? ?????? ????????????? ? ?????????? ???? (InterBase 5.6).
??? ??????????? ???? ?????? ?????????????? ?????????? ????????? (??? ?????????????? ??????????????) ??????????? ? ???, ????? ??????? ??? ?????????? ?? ?????? (??? ? ???????? ??????????? ?????? - ?? ??????????), ? ????? ?????????? ?????? ????? (? ???????? ??????????? ?????? - ?????????) ??? ??????? ?? ???? ??????. ??? ???????? ?? ?????????????? ?????? ? ?????????????? ????????????? ????????????, ???????? ????????? ? [2].
1. ?? ????????? ?????? ?????????? ???????? ?????????????? ?????? ????? ???????????? ? ???? ?????????, ?????? ???????? ????????? ????? ???????? ?? ??????, ? ??????????? ??????????? - ????????? ?????.
??????????????, ?????? ???????? ?????????? ????? ???????????? ? ???? ????????? ??????? ? ?????????? ????????? ?????? "ID".
2. ????????????? ??????? "??? ??????" ???????? "???. ?????" ???????? ???????????, ?????? ???? ??????? ? ????????? ????????? ?????? ? ????????? ??????????. ?? ? ????? ????????? ?????????????? ? ???????? ????? ?? ??????? ?????, ???????? ???? ??????? ?? ?????????, ? ?????? ?????? ???? ??????? "??????? ??????", ??????? ????? ????????? ? ???? ??????????? ????????? ??????? ??????????? ?????? ??? ?????? ?????. ????????????? ??????? "?????????" ???????? "???????" ????? ? ????? ????????? ?????? ? ??????????? ?? ??????? ???????? ? ????????? ????????? ?????? ? ?????? "ID". ??????? ????? ??????? ???? ??????? ?????????, ???????? ? ???? ???????? ?????????? ?? ???? ???????? ?????????, ???????? ????????????? ?????? ??????. ????????, ???? ??????? ????????????? ????????? ???-99, ?? ?? ???????????? ??????? ????????????? ? ????????? ???-95. ??????? ???????? ?????? ?????????? ????????? ? ??????????????? ???????? ??????? ? ?????? ?????? ???????? ??????????????.
3. ??? ??????? ????? ?:? ???????? ??????????? ??????? ?????? ?????????????? ?????????, ?????????? ?????????????? ??????????? ????????. ?????? 2 ?????????:
?????1 (ID_??????????, ID_????????)
?????2 (ID_????????, ID ??????)
3.2. ???????????? ?????????
?????? ????? ????????? ????????? ?????????????? ?????? ???????? ?? ???????????? ?? ????????, ????????? ? [3].
1. ??????? ????????? ? ?????? ?????????? ????? (1??) ????? ? ?????? ?????, ????? ?? ???? ?? ?? ????? ?? ???????? ? ????? ????? ???? ????? ?????? ???????? ? ?? ???? ?? ?? ???????? ????? ?? ?????.
??? ??????? ????????????? ?? ????????????? ????? ???????????.
2. ??????? ????????? ?? ?????? ?????????? ????? (2??), ???? ??? ????????????? ??????????? 1?? ? ??? ?? ????, ?? ???????? ? ????????? ????, ??????? ?????? ?????????????? ???????????? ? ????????? ??????. ??? ??? ?? ???? ???????? ????????? ?????? ???????? "????????" ID, ?? ??? ??????? ????????????? ?? ????????????? ????? ???????????.
3. ??????? ????????? ? ??????? ?????????? ????? (3??), ???? ??? ????????????? ??????????? 2?? ? ?? ???? ?? ?? ?????????? ????? ?? ??????? ????????????? ?? ?????? ??????? ??????????? ????.
????? ?????????? ?? ????????????? ????????? "??????????" (????? ????????? ??????? ?? ?? ????????? ???????? "????") ? "???. ?????" (??????????? ??????? ? ????????? "??????"). ??? ???????????? ??????? ?????????? ????????? ???? ?????????.
????????? (ID, ????????, ???????? ???????, ????, ??????? ????, ??? L2, ????)
???? ?????????? (????, ??? L1, ??????, ??????????)
???. ????? (ID, ???????? ??????, ??????, AGP, ?????? ?????, ?????????? ????, ????)
?????? ???. ????? (??????, ?????? ??????????, ??????? ????, ??????? ??????)
????? ?????? ????????? ??????????????? ??????? ????????? ? ????? ????????? ????????? ?????1 ? ?????2:
?????1 (????, ??????)
?????2 (??????, ID)
????? ???????, ??????? ?? ?????????????? ?????????????? ?????? ? ??????? ?? ???????????? ?? ???????????? 3??, ????? ?????????? ??????????? ????????? ????????????? ??????????? ?? (??????? 2).
??????? "??????????", "???. ?????", "??????", "????????" ???????? ???????????, ??? ??? ??? ???????? ?????????? ? ??????????????? ?????????????, ?? ??? ?? ???????? ???????? ??? ??????????? ????? ???????. ??????? "????" ? "???????" ??????? ???????????? ?????????????, ??? ??? ??? ?????? ??? ???????????? ???????????? "??????????" ? "???. ?????" ? ??????????????? ? ??????????? ????? ?? ?????????.
??????? 2 - ?????????????? ??????
4. ?????????????? ??????????????
? ?????? ??????? ??????????? ????? ????????, ??????????? ??? ???????????????? ?????????? ????????? ??????, ????? ? ?????? ?? ?????????? ?????????????.
????????? ??????????? ???????? ??? ?????? ???? ??????:
- ???????? ???????????? ???????
- ?????????? ??????
- ?????????????? ??????
- ???????? ??????
- ????? ???????
????????? ????????????? ????????:
- ???????????????? ????? ????????????? ??????????
- ???????? ???????? ?????
- ?????? ???????? ?????
- ????? ??????? ?? ??????????
- ???????? ?????????? ? ?????????
??? ?????????? ???? ???????? ??????????? ????? ???????.
??-??????, ?????????? ??????? ???? ?????????? ? ?????? ??? ??? ????????.
??????? 3 - ?????????? ???? ???????? ?????
?????? "??????????", "???. ?????", "?????? ??????", "????????" ????????? ???????????? ???????? ??????????, ??????????, ?????????????? ? ???????? ??????? ? ??????????????? ????????, ? ????? ? ??????????? ?? ???????? "????" ? "???????".
?????? "????? ???????" ????????? ?????????????????? ?????????? ???? ??? ????????????? ?????? ???????????? ?????????? ? ????????? ????????????? ? ????? ? ???????????? ?????????? ???????? ?????.
?????? "?????? ????" ???? ??????????? ???????????? ??????????? ??? ????? ????????????? ???????, ? ????? ?????? ??????? ??? ?????? ??????? ???????. ???????: ???????? ?????????? ??????????.
?????: ????? ?? ?????????? ? ????????? ???? ?????? ? ????.
??? ?????? ??????????? ? ??????? ???? ?????????. ????? ????? ???????? ??????????? ?? ????? ??????????? ???????.
??????? 4 - ????????? ???????
???? Processors ??? ????????? ?????????? ? ??????????? ? ??????????? ?? ??????? ??????? "??????????" ???????? ????, ??????????? ????:
??????? 5 - ???? Processors
????????? DBDrid ???????????? ????? ?????????? ? ???????????, ????????? ?? ????????, ???????? ???????, ??????? ????, ??? Level2, ? ????. ??? ?????? ????????????? ???????? ?????????? ? ????? ?????? ?????????? ??????????? ?????? ???? ??????????.
?????? ?? ??????? ????????????? ??????? ?????? ??? ?????? ?????????? ???? ?????????? ? ????????? ???????, ? ????? ?????? ???????? ??????? ??????. ???????? ?????????? ?????? ????? ????????????? ????????????.
??? ??????? ?? ?????? "????????" ??????????? ???? ?dd_pr. ??????? 6 - ???? ?????????? ???????? ???????????
??? ?????????? ?????? ?????????? ????? ??????? ???????? ???? ? ??????? ?????????? ScrollBox. ??? ????????? ???????? ???????? ?????? ? ???????? ????? ??????. ??? ??????? ?? ?????? "??" ?????????? ?????? ????????? ?????? (??? ??????? "Cancel" ?????? ?? ?????????) ? ??????? ? ???? Processors.
???? ???? ?????, ?????????? ??????????? (???????????? ??? ??????????), ????????? ???????, ?? ????? ?????? ????????? ?? ??????.
??????? 7 - ????????? ?? ??????
????? ????????? ?? ?????? ????? ?????????? ?????? ??? ??? ???????????? ???????? ????? ? ? ?????????? ????? ?????????? ? ?????????????? ???????.
??? ??????? ?? ?????? "????????" ??????????? ???? Edit_pr.
??????? 7 - ???? ?????????????? ???????? ???????????
??-???????? ?????????? ?????????? ????????? ??? ????, ?????????? ???????????. ?????? "??" ????????? ????????? ?????????, ?????? "Cancel" ???????????? ??????? ? ???? Processors.
??? ??????? ?? ?????? "???????" ????????????? ????????????? ?? ????????. ??????? 8 - ????????????? ????????
??? ??????? "??" ????????? ?????? ????????? ? ??????????? ????? Processors, ??? ??????? "???" ?????? ??????????? ???? Processors.
?????? "?????????? ????" ????????? ???????????? ? ?????????? ???? ???????????? ???????????.
??????? 9 - ?????????? ???? ???????????? ???????????
????? ????? ????? ????????????, ??????????, ????????? ? ???????? ??????? ? ??????? ?????????? DBNavigator. ??? ???? ????????? ?????????? ? ?????? ??????????? ?????? ? ?????? ?????????? ?????? ????? ??????? ?? ?????? "??" ? "?????????". ?????? "??????" ?????? ???????????? ? ???? Processors ??? ?????????? ????????????? ?????????.
??? ??? ???? ??????? ? ?????????????, ??????????????? ????????? ????????????, ??????????? ????????? ????????? (?????????? ? ???????? ???? ?????????? ????? ?????), ? ?????? ??????? ?????? ?? ????????????? ???????? ?? ?????, ? ??????????? ???? ?????????? ? ????? ???????.
????? ???????? ? ????????? ?????? ???????? ???? - "????? ???????", ??????? ????????? ?????????????????? ???? ??? ?????? ???????????? ??????????.
???? SmetaProc
??????? 10 - ???? ?????? ??????????
???????? ??????? ??? ?????? ????????????? ?????????? ? ???? ?????? ????????? ?????????? ? ???. ??? ??????? ?? ?????? "?????" ?????????? ??????? ? ???????? ????, ??? ??????? ?? "?????" - ? ???? SmetaMP.
???? SmetaMP
??????? 11 - ???? ?????? ??????????? ?????
?????? ????? ??????? ?????? ?? ??????????? ?????, ??????? ?????????? ? ????????? ?? ?????????? ???? ???????????. ????? ??????? ??????????? ????????? ??????. ????? ???????????? ????? ??????? ?????????? ? ????????? ??????????, ? ?????????? ????? ??? ????????? ?????? ?? ??????????? ??????????? ????. ??? ??????? ?? ?????? "?????" ?????????? ??????? ? ???? SmetaProc, ??? ??????? ?? "?????" - ? ???? SmetaMem.
???? SmetaMem
??????? 12 - ???? ?????? ?????? ??????
?????????? ?????????? ????? ???????? ??????? ??? ?????? ??????????? ?????? ??????, ???? ?????? ? ?????? ?????? ? ???????? ? ?????????? ????. ? ??????? ????? ?????? ??????????? ??????, ? ?? ???? ??????????. ????? ?????????? ??????????? ?????? ???????.
???? SmetaMon
??????? 13 - ???? ?????? ????????
?????????? ???????? ????????? DBGrid ??? ?????? ????????, ???? ?????? ?????????? ? ????????? ????????, ?????? ???????? ? SmetaMem ? ???????? ? ???? SmetaItog.
???? SmetaItog
??????? 14 - ???????? ???? ?????
????? ?? ?????? ?????????? ? ????????? ?????????????, ?? ??????????? ??????????????? ? ?????, ? ????? ????? ????? ???????. ?????????? ??????????? ???????? ? ??????????? ???? (?????? "?????"), ?????? ????? ?? ?????? (?????? "??????"), ?????? ?????? ??????? ("??????"), ? ????? ???????? ???????????? ????? ? ??????????? ?? ? ??????? ??????? ("???????"). ????? ???????? ??? ?????? ????? ?????????????? ??????? ? ???????? ???? ?????????.
??? ?????? ?????? "?????? ????" ???????? ???? ????????? ?????????? ????? ??????? ????????? ??????????. ????? ???????????? ?????????? ??????????? ??? ?????? ???????, ???????????? ?? ??????. ??? ??? ??????? ?? ???????? ????????????? ????? ?????, ?? ????????????? ?? ??? ??? ?????? ???????????? ??????? ????? ????????. ??? ?????????? ?????? ????? ??????????????? ??????? ?? ????? ???????. ???????????? ?????????? ?????? ???? ???? ??? ??????, ???????? ??????? ???????? (??? ??? ? ?????), ??? ??????? ?????????? ???????? ?? ????????????? ?????? (??? ????????? ?????), ? ????????? ??? ??????? ??? ??????, ??????????????? ???????????? ???????????. ?????? ??? ?? ???????? ??????? ????? ????? ???????????? ????????.
??? ??? ????? ????? ??????? ? ?????? ????? ? ??????? ????????? ComboBox, Edit, DateTimePicker. ?????? ?????? ???????????, ???????????? ?? ?????, ??????? ?? ???? ?????????? ???? ??? ??????.
??????? 15 - ?????????? ???? ??????? ??????????
????? ?? ???????? ???? ????? ??????????? ?????????? ?????????? ??? ??????? ?????? "???????". ??????? 17 - ?????????? ??????????
????? ??????? ?? ??????????? ??? ?????????? ????, ?????????????? ?? ????????????? ????? ???????.
??????????
? ?????? ???????? ?????? ???? ??????????? ???????? ???????? ??????????????? ? ??????????????? ?????????????? ?? ????????? ????????? ?????????? ???????.
???? ?????????????? ? ??????????? ??????????, ??????????? ?????? ? ?????? ??????????? ????? ???????????? ???????????, ? ????? ???????????? ?????? ?? ???? ????????? ? ??????? ?????????????. ??????? ?????? ????????? SQL-????????, ??????? ?????? ? InterBase ? ?????????? ???????????? ? C++Builder. ? ?????? ????? ?????? ???? ???? ???????? ?????????? ???????, ?????????????? ?????????? ? ?????? ? ???????????.
?? ?????? ????? ??? ????????? ?????? ????????? ? ?? ?????????, ??????????? ??? ??????? ???????????? ??????, ???????????? ??????????? ???????????. ? ?????????? ???? ??????????? ?????????????? ?????? ?????????? ???????.
?? ????????? ????? ? ??????? ????? ????? ?????????? ???????????? ????????? ???? ?????????????? ? ???????????? ?????????? ?????????????? ??????.
? ????????? ????? ??? ?????????? ???????? ??????? ????????? ? ?????????????, ????????? ?????????????? ??????????????. ? ?????????? ???? ???????????? ??????????? ????? ??????? ? ????????? ???????? ???????? ????.
????? ???????, ??? ???????????? ?????? ????????? ? ?????? ??????.
?????????? ? (????????????)
??????? ??????? ???????? ???? ??????
CREATE DATABASE "computers.gdb" USER "max" PASSWORD "852";
CREATE GENERATOR Proc_ID;
CREATE GENERATOR Mat_ID;
CREATE GENERATOR Mem_ID;
CREATE GENERATOR Mon_ID;
CREATE GENERATOR Reg_ID;
SET GENERATOR Proc_ID TO 0;
SET GENERATOR Mat_ID TO 0;
SET GENERATOR Mem_ID TO 0;
SET GENERATOR Mon_ID TO 0;
SET GENERATOR Reg_ID TO 0;
CREATE TABLE Kernels(
kernelVARCHAR(20) NOT NULL Primary Key,
cashl1INTEGER,
placeVARCHAR(20) NOT NULL,
technologyFLOAT
);
CREATE TABLE Processors (
idINTEGER NOT NULL Primary Key,
name VARCHAR(30) NOT NULL,
frequencyINTEGER NOT NULL,
kernelVARCHAR(20) REFERENCES Kernels(kernel) ON UPDATE CASCADE ON DELETE SET NULL,
freqbusINTEGER NOT NULL,
cashl2INTEGER,
priceFLOAT NOT NULL
);
SET TERM !! ;
CREATE TRIGGER SET_Proc_ID FOR Processors
BEFORE INSERT AS
BEGIN
NEW.id = GEN_ID(Proc_ID, 1);
END !!
SET TERM ; !!
CREATE TABLE Chipsets (
chipsetVARCHAR(20) NOT NULL Primary Key,
placeVARCHAR(20) NOT NULL,
freqcpuINTEGER,
freqmemINTEGER NOT NULL
);
CREATE TABLE Matplatas (
idINTEGER NOT NULL Primary Key,
nameVARCHAR(30) NOT NULL,
chipsetVARCHAR(20) REFERENCES Chipsets(chipset) ON UPDATE CASCADE ON DELETE SET NULL,
agpINTEGER DEFAULT 8,
formatVARCHAR(10) DEFAULT "ATX",
soundVARCHAR(10) DEFAULT "AC-97",
priceDECIMAL(10,2) NOT NULL
);
SET TERM !! ;
CREATE TRIGGER SET_Mat_ID FOR MatPlatas
BEFORE INSERT AS
BEGIN
NEW.id = GEN_ID(Mat_ID, 1);
END !!
SET TERM ; !!
CREATE TABLE Memorys (
idINTEGER NOT NULL Primary Key,
nameVARCHAR(50) NOT NULL,
typeVARCHAR(10) DEFAULT "DDR" NOT NULL,
volumeINTEGER NOT NULL,
frequencyINTEGER NOT NULL,
priceDECIMAL(10,2) NOT NULL
);
SET TERM !! ;
CREATE TRIGGER SET_Mem_ID FOR Memorys
BEFORE INSERT AS
BEGIN
NEW.id = GEN_ID(Mem_ID, 1);
END !!
SET TERM ; !!
CREATE TABLE Monitors (
idINTEGER NOT NULL Primary Key,
nameVARCHAR(50) NOT NULL,
diagonalINTEGER DEFAULT 17 NOT NULL,
typeVARCHAR(10) NOT NULL,
maxrazrVARCHAR(15),
rekrazrVARCHAR(15),
standartVARCHAR(10),
priceDECIMAL(10,2) NOT NULL
);
SET TERM !! ;
CREATE TRIGGER SET_Mon_ID FOR Monitors
BEFORE INSERT AS
BEGIN
NEW.id = GEN_ID(Mon_ID, 1);
END !!
SET TERM ; !!
CREATE TABLE Register (
idINTEGER NOT NULL Primary Key,
dataDATE NOT NULL,
customerVARCHAR(30) DEFAULT "??????? ????",
procINTEGER,
matplINTEGER,
memINTEGER,
monINTEGER,
summaDECIMAL(10,2) NOT NULL
);
SET TERM !! ;
CREATE TRIGGER SET_Reg_ID FOR Register
BEFORE INSERT AS
BEGIN
NEW.id = GEN_ID(Reg_ID, 1);
END !!
SET TERM ; !!
COMMIT;
?????????? ? (????????????)
???????? ???????? ???????
?????????? ?????? ? ??????? "??????????"
bool flag_close=true;
IBQuery1->SQL->Clear();
AnsiString text="",text1="",text2="";
text="insert into Processors (NAME, FREQUENCY";
if(ComboBox1->GetTextLen()>0)
{ text=text+", KERNEL";
text1=",'"+ComboBox1->Text+"'";
}
text=text+", FREQBUS";
if(Edit6->GetTextLen()>0)
{ text=text+", CASHL2";
text2=","+Edit6->Text;
}
try {
IBQuery1->SQL->Add(text+", PRICE) values ('" +
Edit2->Text + "', " + Edit3->Text +text1+", " +
Edit5->Text + text2+", '"+
Edit7->Text+"')");
IBQuery1->ExecSQL();
}
catch (...) {
Application->MessageBox("??????? ??????? ??????", "??????", MB_OK + MB_ICONSTOP);
flag_close=false;
}
if(flag_close) FormProcAdd->Close(); ?????????????? ?????? ? ??????? "??????????"
bool flag_close=true;
IBQuery1->SQL->Clear();
AnsiString text;
text="update Processors Set ID=" +
Edit1->Text + ", NAME='" + Edit2->Text + "', FREQUENCY= " + Edit3->Text;
if(ComboBox1->GetTextLen()>0)
{ text=text+", KERNEL='"+ComboBox1->Text+"'";
}
else text=text+", KERNEL=NULL";
text=text+", FREQBUS= " + Edit5->Text;
if(Edit6->GetTextLen()>0)
{ text=text+", CASHL2="+Edit6->Text;
}
else text=text+", CASHL2=NULL";
text=text+",PRICE= '"+
Edit7->Text+"' where id="+FormProc->IBQuery1->FieldByName("ID")->AsString;
try {
IBQuery1->SQL->Add(text);
IBQuery1->ExecSQL();
}
catch(...) {
Application->MessageBox("??????? ??????? ??????", "??????", MB_OK + MB_ICONSTOP);
flag_close=false;
}
if(flag_close) FormProcEdit->Close();
???????? ?????? ?? ??????? "??????????"
if (Application->MessageBox("?? ????????????? ?????? ??????? ???????", "?????????????", MB_YESNO + MB_ICONQUESTION)==IDNO)
return;
IBQuery2->SQL->Clear();
IBQuery2->SQL->Add("delete from Processors where id=:id");
IBQuery2->ExecSQL();
IBQuery2->SQL->Clear();
IBQuery2->SQL->Add("select * from kernels where(kernel=:kernel)");
IBQuery2->Open();
IBQuery1->Close();
IBQuery1->Open(); ????? ??????? ? ??????? "??????????"
void __fastcall TFormProc::FormShow(TObject *Sender)
{
ComboBox1->Clear();
ComboBox2->Clear();
IBQuery3->GetFieldNames(ComboBox1->Items);
ComboBox1->ItemIndex=0;
ComboBox2->Clear();
IBQuery3->SQL->Clear();
IBQuery3->SQL->Add("Select Distinct "+ComboBox1->Text+" As Par From Processors");
IBQuery3->Open();
while (!IBQuery3->Eof)
{
ComboBox2->Items->Add(IBQuery3->FieldByName("Par")->AsString);
IBQuery3->Next();
}
ComboBox2->ItemIndex=0;
}
}
void __fastcall TFormProc::Button7Click(TObject *Sender)
{
IBQuery1->SQL->Clear();
IBQuery1->SQL->Add("Select * From Processors where "+ComboBox1->Text+"='"+ComboBox2->Text+"'");
IBQuery1->Open();
IBQuery1->SQL->Clear();
IBQuery1->SQL->Add("Select * From Processors where "+ComboBox1->Text+"='"+ComboBox2->Text+"'");
IBQuery1->Open();
Button8->Enabled=true;
}
?????????? ??????????? "??????????" ? ???????????? ??????????? "????"
void __fastcall TFormProc::DataSource1DataChange(TObject *Sender,
TField *Field)
{
IBQuery2->SQL->Clear();
IBQuery2->SQL->Add("SELECT * FROM Kernels WHERE kernel=:kernel");
IBQuery2->Open();
Edit1->Text=IBQuery2->FieldByName("KERNEL")->AsString;
Edit3->Text=IBQuery2->FieldByName("CASHL1")->AsString;
Edit2->Text=IBQuery2->FieldByName("PLACE")->AsString;
Edit4->Text=FloatToStrF(IBQuery2->FieldByName("TECHNOLOGY")->AsFloat,ffFixed,2,2);
}
??????? ????? SmetaProc
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "MF_Unit.h"
#include "SmetaProc_unit.h"
#include "SmetaItog_unit.h"
#include "SmetaMat_unit.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TSmetaProc *SmetaProc;
//---------------------------------------------------------------------------
__fastcall TSmetaProc::TSmetaProc(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TSmetaProc::Otbor()
{
ComboBox2->Clear();
IBQuery3->SQL->Clear();
IBQuery3->SQL->Add("Select Distinct "+ComboBox1->Text+" As Par From Processors");
IBQuery3->Open();
while (!IBQuery3->Eof)
{
ComboBox2->Items->Add(IBQuery3->FieldByName("Par")->AsString);
IBQuery3->Next();
}
ComboBox2->ItemIndex=0;
}
void __fastcall TSmetaProc::Button1Click(TObject *Sender)
{
SmetaProc->Close(); }
//---------------------------------------------------------------------------
void __fastcall TSmetaProc::DataSource1DataChange(TObject *Sender,
TField *Field)
{
IBQuery2->SQL->Clear();
IBQuery2->SQL->Add("SELECT * FROM Kernels WHERE kernel=:kernel");
IBQuery2->Open();
Edit1->Text=IBQuery2->FieldByName("KERNEL")->AsString;
Edit3->Text=IBQuery2->FieldByName("CASHL1")->AsString;
Edit2->Text=IBQuery2->FieldByName("PLACE")->AsString;
Edit4->Text=FloatToStrF(IBQuery2->FieldByName("TECHNOLOGY")->AsFloat,ffFixed,2,2);
}
//---------------------------------------------------------------------------
void __fastcall TSmetaProc::FormCreate(TObject *Sender)
{
ComboBox1->Clear();
ComboBox2->Clear();
IBQuery3->GetFieldNames(ComboBox1->Items);
ComboBox1->ItemIndex=0;
Otbor();
}
//---------------------------------------------------------------------------
void __fastcall TSmetaProc::ComboBox1Change(TObject *Sender)
{
Otbor();
}
//---------------------------------------------------------------------------
void __fastcall TSmetaProc::Button7Click(TObject *Sender)
{
IBQuery1->SQL->Clear();
IBQuery1->SQL->Add("Select * From Processors where "+ComboBox1->Text+"='"+ComboBox2->Text+"'");
IBQuery1->Open();
IBQuery1->SQL->Clear();
IBQuery1->SQL->Add("Select * From Processors where "+ComboBox1->Text+"='"+ComboBox2->Text+"'");
IBQuery1->Open();
Button8->Enabled=true;
}
//---------------------------------------------------------------------------
void __fastcall TSmetaProc::Button8Click(TObject *Sender)
{
IBQuery1->SQL->Clear();
IBQuery1->SQL->Add("Select * From Processors");
IBQuery1->Open();
Button8->Enabled=false;
}
//---------------------------------------------------------------------------
void __fastcall TSmetaProc::FormShow(TObject *Sender)
{
Otbor();
}
//---------------------------------------------------------------------------
void __fastcall TSmetaProc::Button2Click(TObject *Sender)
{
SmetaItog->Edit1->Text=IBQuery1->FieldByName("NAME")->AsString+
" <"+IBQuery2->FieldByName("PLACE")->AsString+
", "+IBQuery1->FieldByName("FREQUENCY")->AsString+" MHz"+
", "+IBQuery1->FieldByName("KERNEL")->AsString+
", FSB "+IBQuery1->FieldByName("FREQBUS")->AsString+
">";
SmetaItog->ProcID=IBQuery1->FieldByName("ID")->AsInteger;
SmetaItog->Label5->Caption=StringReplace(FloatToStrF(IBQuery1->FieldByName("PRICE")->AsFloat,ffGeneral,6,2),',','.',TReplaceFlags()<<rfReplaceAll);
SmetaProc->Close();
SmetaMat->Show();
}
//---------------------------------------------------------------------------
??????? ????? SmetaMP
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "SmetaMat_unit.h"
#include "SmetaItog_unit.h"
#include "SmetaProc_unit.h"
#include "SmetaMem_unit.h"
#include "MF_Unit.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TSmetaMat *SmetaMat;
AnsiString TextQuery="";
//---------------------------------------------------------------------------
__fastcall TSmetaMat::TSmetaMat(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TSmetaMat::Otbor()
{
ComboBox2->Clear();
IBQuery3->SQL->Clear();
IBQuery3->SQL->Add("Select Distinct "+ComboBox1->Text+" As Par From Matplatas "+TextQuery);
IBQuery3->Open();
while (!IBQuery3->Eof)
{
ComboBox2->Items->Add(IBQuery3->FieldByName("Par")->AsString);
IBQuery3->Next();
}
ComboBox2->ItemIndex=0;
}
void __fastcall TSmetaMat::Button1Click(TObject *Sender)
{
SmetaMat->Close();
SmetaProc->Show();
}
//---------------------------------------------------------------------------
void __fastcall TSmetaMat::DataSource1DataChange(TObject *Sender,
TField *Field)
{
IBQuery2->SQL->Clear();
IBQuery2->SQL->Add("select * from CHIPSETS where(CHIPSET=:CHIPSET)");
IBQuery2->Open();
Edit1->Text=IBQuery2->FieldByName("CHIPSET")->AsString;
Edit3->Text=IBQuery2->FieldByName("PLACE")->AsString;
Edit2->Text=IBQuery2->FieldByName("FREQCPU")->AsInteger;
Edit4->Text=IBQuery2->FieldByName("FREQMEM")->AsInteger;
}
//---------------------------------------------------------------------------
void __fastcall TSmetaMat::FormCreate(TObject *Sender)
{
ComboBox1->Clear();
ComboBox2->Clear();
IBQuery3->GetFieldNames(ComboBox1->Items);
ComboBox1->ItemIndex=0;
Otbor();
}
//---------------------------------------------------------------------------
void __fastcall TSmetaMat::ComboBox1Change(TObject *Sender)
{
Otbor();
}
//---------------------------------------------------------------------------
void __fastcall TSmetaMat::Button7Click(TObject *Sender)
{
IBQuery1->SQL->Clear();
IBQuery1->SQL->Add("Select * From Matplatas "+TextQuery+" AND("+ComboBox1->Text+"='"+ComboBox2->Text+"')");
IBQuery1->Open();
IBQuery1->SQL->Clear();
IBQuery1->SQL->Add("Select * From Matplatas "+TextQuery+" AND("+ComboBox1->Text+"='"+ComboBox2->Text+"')");
IBQuery1->Open();
Button8->Enabled=true;
}
//---------------------------------------------------------------------------
void __fastcall TSmetaMat::Button8Click(TObject *Sender)
{
IBQuery1->SQL->Clear();
IBQuery1->SQL->Add("Select * From Matplatas "+TextQuery);
IBQuery1->Open();
Button8->Enabled=false;
}
//---------------------------------------------------------------------------
void __fastcall TSmetaMat::FormShow(TObject *Sender)
{
AnsiString text;
IBQuery1->SQL->Clear();
text=SmetaProc->IBQuery2->FieldByName("Place")->AsString;
TextQuery="where (chipset IN(select Chipset from Chipsets where (place ='"+text+"')))";
IBQuery1->SQL->Add("Select * From Matplatas "+TextQuery);
IBQuery1->Open();
Otbor();
Label7->Caption="????????? "+SmetaItog->Edit1->Text;
}
//---------------------------------------------------------------------------
void __fastcall TSmetaMat::Button2Click(TObject *Sender)
{
SmetaItog->Edit2->Text=IBQuery1->FieldByName("NAME")->AsString+
" <"+IBQuery2->FieldByName("PLACE")->AsString+
", "+IBQuery1->FieldByName("CHIPSET")->AsString+
", FSB"+IBQuery2->FieldByName("FREQCPU")->AsString+
", DDR"+IBQuery2->FieldByName("FREQMEM")->AsString+
", "+IBQuery1->FieldByName("FORMAT")->AsString+
">";
SmetaItog->MatID=IBQuery1->FieldByName("ID")->AsInteger;
SmetaItog->Label6->Caption=StringReplace(FloatToStrF(IBQuery1->FieldByName("PRICE")->AsFloat,ffGeneral,6,2),',','.',TReplaceFlags()<<rfReplaceAll);
SmetaMat->Close();
SmetaMem->Show();
//SmetaItog->ShowModal();
}
//---------------------------------------------------------------------------
??????? ????? SmetaMem
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "SmetaMat_unit.h"
#include "SmetaItog_unit.h"
#include "MF_Unit.h"
#include "SmetaMon_unit.h"
#include "SmetaMem_unit.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TSmetaMem *SmetaMem;
AnsiString TextQueryMem="";
//---------------------------------------------------------------------------
__fastcall TSmetaMem::TSmetaMem(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TSmetaMem::Otbor()
{
ComboBox2->Clear();
IBQuery3->SQL->Clear();
IBQuery3->SQL->Add("Select Distinct "+ComboBox1->Text+" As Par From Memorys "+TextQueryMem);
IBQuery3->Open();
while (!IBQuery3->Eof)
{
ComboBox2->Items->Add(IBQuery3->FieldByName("Par")->AsString);
IBQuery3->Next();
}
ComboBox2->ItemIndex=0;
}
void __fastcall TSmetaMem::Button1Click(TObject *Sender)
{
SmetaMem->Close();
SmetaMat->Show();
}
//---------------------------------------------------------------------------
void __fastcall TSmetaMem::FormCreate(TObject *Sender)
{
ComboBox1->Clear();
ComboBox2->Clear();
IBQuery3->GetFieldNames(ComboBox1->Items);
ComboBox1->ItemIndex=0;
Otbor();
}
//---------------------------------------------------------------------------
void __fastcall TSmetaMem::ComboBox1Change(TObject *Sender)
{
Otbor();
}
//---------------------------------------------------------------------------
void __fastcall TSmetaMem::Button7Click(TObject *Sender)
{
IBQuery1->SQL->Clear();
IBQuery1->SQL->Add("Select * From Memorys "+TextQueryMem+" AND ("+ComboBox1->Text+"='"+ComboBox2->Text+"')");
IBQuery1->Open();
IBQuery1->SQL->Clear();
IBQuery1->SQL->Add("Select * From Memorys "+TextQueryMem+" AND ("+ComboBox1->Text+"='"+ComboBox2->Text+"')");
IBQuery1->Open();
Button8->Enabled=true;
}
//---------------------------------------------------------------------------
void __fastcall TSmetaMem::Button8Click(TObject *Sender)
{
IBQuery1->SQL->Clear();
IBQuery1->SQL->Add("Select * From Memorys "+TextQueryMem);
IBQuery1->Open();
Button8->Enabled=false;
}
//---------------------------------------------------------------------------
void __fastcall TSmetaMem::FormShow(TObject *Sender)
{
AnsiString text;
IBQuery1->SQL->Clear();
text=SmetaMat->IBQuery2->FieldByName("Freqmem")->AsString;
TextQueryMem="where (Frequency <= "+text+")";
IBQuery1->SQL->Add("Select * From Memorys "+TextQueryMem);
IBQuery1->Open();
Otbor();
Label1->Caption="????????? "+SmetaItog->Edit1->Text;
Label3->Caption="???. ????? "+SmetaItog->Edit2->Text;
}
//---------------------------------------------------------------------------
void __fastcall TSmetaMem::Button2Click(TObject *Sender)
{
SmetaItog->Edit3->Text=IBQuery1->FieldByName("NAME")->AsString;
SmetaItog->MemID=IBQuery1->FieldByName("ID")->AsInteger;
SmetaItog->Label7->Caption=StringReplace(FloatToStrF(IBQuery1->FieldByName("PRICE")->AsFloat,ffGeneral,6,2),',','.',TReplaceFlags()<<rfReplaceAll);
SmetaMem->Close();
SmetaMon->Show();
}
??????? ????? SmetaMon
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "SmetaMon_unit.h"
#include "MF_Unit.h"
#include "SmetaItog_unit.h"
#include "SmetaMem_unit.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TSmetaMon *SmetaMon;
//---------------------------------------------------------------------------
__fastcall TSmetaMon::TSmetaMon(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TSmetaMon::Otbor()
{
ComboBox2->Clear();
IBQuery3->SQL->Clear();
IBQuery3->SQL->Add("Select Distinct "+ComboBox1->Text+" As Par From Monitors");
IBQuery3->Open();
while (!IBQuery3->Eof)
{
ComboBox2->Items->Add(IBQuery3->FieldByName("Par")->AsString);
IBQuery3->Next();
}
ComboBox2->ItemIndex=0;
}
void __fastcall TSmetaMon::Button1Click(TObject *Sender)
{
SmetaMon->Close();
SmetaMem->Show();
}
//---------------------------------------------------------------------------
void __fastcall TSmetaMon::FormCreate(TObject *Sender)
{
ComboBox1->Clear();
ComboBox2->Clear();
IBQuery3->GetFieldNames(ComboBox1->Items);
ComboBox1->ItemIndex=0;
Otbor();
}
//---------------------------------------------------------------------------
void __fastcall TSmetaMon::ComboBox1Change(TObject *Sender)
{
Otbor();
}
//---------------------------------------------------------------------------
void __fastcall TSmetaMon::Button7Click(TObject *Sender)
{
IBQuery1->SQL->Clear();
IBQuery1->SQL->Add("Select * From Monitors where "+ComboBox1->Text+"='"+ComboBox2->Text+"'");
IBQuery1->Open();
IBQuery1->SQL->Clear();
IBQuery1->SQL->Add("Select * From Monitors where "+ComboBox1->Text+"='"+ComboBox2->Text+"'");
IBQuery1->Open();
Button8->Enabled=true;
}
//---------------------------------------------------------------------------
void __fastcall TSmetaMon::Button8Click(TObject *Sender)
{
IBQuery1->SQL->Clear();
IBQuery1->SQL->Add("Select * From Monitors");
IBQuery1->Open();
Button8->Enabled=false;
}
//---------------------------------------------------------------------------
void __fastcall TSmetaMon::FormShow(TObject *Sender)
{
IBQuery1->SQL->Clear();
IBQuery1->SQL->Add("Select * From Monitors");
IBQuery1->Open();
Otbor();
Label4->Caption="????????? "+SmetaItog->Edit1->Text;
Label5->Caption="???. ????? "+SmetaItog->Edit2->Text;
Label7->Caption="?????? "+SmetaItog->Edit3->Text;
}
//---------------------------------------------------------------------------
void __fastcall TSmetaMon::DataSource1DataChange(TObject *Sender,
TField *Field)
{
Edit1->Text=IBQuery1->FieldByName("MAXRAZR")->AsString;
Edit2->Text=IBQuery1->FieldByName("REKRAZR")->AsString;
}
//---------------------------------------------------------------------------
void __fastcall TSmetaMon::Button2Click(TObject *Sender)
{
SmetaItog->Edit4->Text=IBQuery1->FieldByName("Diagonal")->AsString+"'' "+
IBQuery1->FieldByName("NAME")->AsString+
" <"+IBQuery1->FieldByName("TYPE")->AsString+
", "+IBQuery1->FieldByName("REKRAZR")->AsString+
", "+IBQuery1->FieldByName("STANDART")->AsString+
">";
SmetaItog->MonID=IBQuery1->FieldByName("ID")->AsInteger;
SmetaItog->Label8->Caption=StringReplace(FloatToStrF(IBQuery1->FieldByName("PRICE")->AsFloat,ffGeneral,6,2),',','.',TReplaceFlags()<<rfReplaceAll);
SmetaMon->Close();
SmetaItog->Show();
}
//---------------------------------------------------------------------------
??????? ????? SmetaItog
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "MF_Unit.h"
#include "SmetaRep_unit.h"
#include "SmetaMon_unit.h"
#include "SmetaItog_unit.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TSmetaItog *SmetaItog;
int number;
//---------------------------------------------------------------------------
__fastcall TSmetaItog::TSmetaItog(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TSmetaItog::Button2Click(TObject *Sender)
{
SmetaItog->Close();
}
//---------------------------------------------------------------------------
void __fastcall TSmetaItog::FormShow(TObject *Sender)
{
float result;
result=StrToFloat(Label5->Caption)+StrToFloat(Label6->Caption)+StrToFloat(Label7->Caption)+StrToFloat(Label8->Caption);
Label10->Caption=StringReplace(FloatToStrF(result,ffGeneral,6,2),',','.',TReplaceFlags()<<rfReplaceAll);
IBQuery1->SQL->Clear();
IBQuery1->SQL->Add("Select MAX(ID) as Max_ID from Register");
IBQuery1->Open();
number=IBQuery1->FieldByName("Max_ID")->AsInteger+1;
Edit5->Text="??????? ????";
}
//---------------------------------------------------------------------------
void __fastcall TSmetaItog::Button1Click(TObject *Sender)
{
bool flag_close=true;
AnsiString text;
IBQuery1->SQL->Clear();
try {
IBQuery1->SQL->Add("Insert into Register (DATA,CUSTOMER,PROC,MATPL,MEM,MON,SUMMA) values ('"+DateToStr(Date())+"','"+
Edit5->Text+"',"+ProcID+","+MatID+","+MemID+","+MonID+",'"+
Label10->Caption+"')");
IBQuery1->ExecSQL();
}
catch (...) {
Application->MessageBox("??????? ??????? ??????", "??????", MB_OK + MB_ICONSTOP);
flag_close=false;
}
if(flag_close)
{ text="??????? ??????? ???????????????? ??? ??????? "+IntToStr(number);
Application->MessageBox(text.c_str(), "?????????", MB_OK + MB_ICONINFORMATION);
//ShowMessage("??????? ??????? ???????????????? ??? ??????? "+IntToStr(number));
SmetaItog->Close();
}
/*IBQuery1->SQL->Clear();
IBQuery1->SQL->Add("Select * from Register");
IBQuery1->Open(); */
}
//---------------------------------------------------------------------------
void __fastcall TSmetaItog::Button3Click(TObject *Sender)
{
SmetaRep->QRLabel10->Caption=Edit1->Text;
SmetaRep->QRLabel14->Caption=Label5->Caption;
SmetaRep->QRLabel11->Caption=Edit2->Text;
SmetaRep->QRLabel15->Caption=Label6->Caption;
SmetaRep->QRLabel12->Caption=Edit3->Text;
SmetaRep->QRLabel16->Caption=Label7->Caption;
SmetaRep->QRLabel13->Caption=Edit4->Text;
SmetaRep->QRLabel17->Caption=Label8->Caption;
SmetaRep->QRLabel4->Caption=Edit5->Text;
SmetaRep->QRLabel18->Caption=Label10->Caption;
SmetaRep->QRLabel25->Caption=IntToStr(number);
SmetaRep->QuickRep1->Preview();
}
//---------------------------------------------------------------------------
void __fastcall TSmetaItog::Button4Click(TObject *Sender)
{
SmetaItog->Close();
SmetaMon->Show();
}
//---------------------------------------------------------------------------
??????? ????? Register
//---------------------------------------------------------------------------
#include <vcl.h>
#include <systdate.h>
#pragma hdrstop
#include "MF_Unit.h"
#include "Register_unit.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TFormReg *FormReg;
//---------------------------------------------------------------------------
__fastcall TFormReg::TFormReg(TComponent* Owner)
: TForm(Owner)
{
}
void __fastcall TFormReg::Otbor(int flag)
{
if(flag==1) //?????
{ Label7->Visible=true;
Label8->Visible=true;
Edit5->Visible=true;
Edit6->Visible=true;
Label6->Visible=false;
ComboBox2->Visible=false;
DatePicker1->Visible=false;
DatePicker2->Visible=false;
}
if(flag==2) //????
{ Label7->Visible=true;
Label8->Visible=true;
Edit5->Visible=false;
Edit6->Visible=false;
Label6->Visible=false;
ComboBox2->Visible=false;
DatePicker1->Visible=true;
DatePicker2->Visible=true;
}
if(flag==3) //????????
{ Label7->Visible=false;
Label8->Visible=false;
Edit5->Visible=false;
Edit6->Visible=false;
Label6->Visible=true;
ComboBox2->Visible=true;
DatePicker1->Visible=false;
DatePicker2->Visible=false;
}
}
//---------------------------------------------------------------------------
void __fastcall TFormReg::Button1Click(TObject *Sender)
{
FormReg->Close();
}
//---------------------------------------------------------------------------
void __fastcall TFormReg::DataSource1DataChange(TObject *Sender,
TField *Field)
{
IBQuery2->SQL->Clear();
IBQuery2->SQL->Add("Select name as Proc_Name from Processors where id=:proc");
IBQuery2->Open();
Edit1->Text=IBQuery2->FieldByName("Proc_Name")->AsString;
IBQuery2->SQL->Clear();
IBQuery2->SQL->Add("Select name as Mat_Name from Matplatas where id=:matpl");
IBQuery2->Open();
Edit2->Text=IBQuery2->FieldByName("Mat_Name")->AsString;
IBQuery2->SQL->Clear();
IBQuery2->SQL->Add("Select name as Mem_Name from Memorys where id=:mem");
IBQuery2->Open();
Edit3->Text=IBQuery2->FieldByName("Mem_Name")->AsString;
IBQuery2->SQL->Clear();
IBQuery2->SQL->Add("Select name as Mon_Name from Monitors where id=:mon");
IBQuery2->Open();
Edit4->Text=IBQuery2->FieldByName("Mon_Name")->AsString;
}
//---------------------------------------------------------------------------
void __fastcall TFormReg::FormShow(TObject *Sender)
{
IBQuery1->Close();
IBQuery1->Open();
ComboBox1->ItemIndex=0;
Otbor(1);
}
//---------------------------------------------------------------------------
void __fastcall TFormReg::Button2Click(TObject *Sender)
{
if(ComboBox1->ItemIndex==0) //ID
{ try {
IBQuery1->SQL->Clear();
IBQuery1->SQL->Add("Select * from Register where Id between "+Edit5->Text+" AND "+Edit6->Text);
IBQuery1->Open();
}
catch (...) {
Application->MessageBox("??????? ??????? ??????", "??????", MB_OK + MB_ICONSTOP);
}
}
if(ComboBox1->ItemIndex==1) //????
{ try {
IBQuery1->SQL->Clear();
IBQuery1->SQL->Add("Select * from Register where Data between '"+DateToStr(DatePicker1->Date)+"' AND '"+DateToStr(DatePicker2->Date)+"'");
IBQuery1->Open();
}
catch (...) {
Application->MessageBox("??????? ??????? ??????", "??????", MB_OK + MB_ICONSTOP);
}
}
if(ComboBox1->ItemIndex==2) //??????????
{ try {
IBQuery1->SQL->Clear();
IBQuery1->SQL->Add("Select * from Register where Customer = '"+ComboBox2->Text+"'");
IBQuery1->Open();
}
catch (...) {
Application->MessageBox("??????? ??????? ??????", "??????", MB_OK + MB_ICONSTOP);
}
}
if(ComboBox1->ItemIndex==3) //?????
{ try {
IBQuery1->SQL->Clear();
IBQuery1->SQL->Add("Select * from Register where Summa between '"+Edit5->Text+"' AND '"+Edit6->Text+"'");
IBQuery1->Open();
}
catch (...) {
Application->MessageBox("??????? ??????? ??????", "??????", MB_OK + MB_ICONSTOP);
}
}
if(ComboBox1->ItemIndex==4) //?????????
{ try {
IBQuery1->SQL->Clear();
IBQuery1->SQL->Add("Select * from Register where proc in (select Id from processors where name= '"+ComboBox2->Text+"')");
IBQuery1->Open();
}
catch (...) {
Application->MessageBox("??????? ??????? ??????", "??????", MB_OK + MB_ICONSTOP);
}
}
if(ComboBox1->ItemIndex==5) //???.?????
{ try {
IBQuery1->SQL->Clear();
IBQuery1->SQL->Add("Select * from Register where matpl in(select Id from matplatas where name = '"+ComboBox2->Text+"')");
IBQuery1->Open();
}
catch (...) {
Application->MessageBox("??????? ??????? ??????", "??????", MB_OK + MB_ICONSTOP);
}
}
if(ComboBox1->ItemIndex==6) //??????
{ try {
IBQuery1->SQL->Clear();
IBQuery1->SQL->Add("Select * from Register where mem in (select Id from memorys where name= '"+ComboBox2->Text+"')");
IBQuery1->Open();
}
catch (...) {
Application->MessageBox("??????? ??????? ??????", "??????", MB_OK + MB_ICONSTOP);
}
}
if(ComboBox1->ItemIndex==7) //???????
{ try {
IBQuery1->SQL->Clear();
IBQuery1->SQL->Add("Select * from Register where mon in (select Id from monitors where name= '"+ComboBox2->Text+"')");
IBQuery1->Open();
}
catch (...) {
Application->MessageBox("??????? ??????? ??????", "??????", MB_OK + MB_ICONSTOP);
}
}
}
//---------------------------------------------------------------------------
void __fastcall TFormReg::Button3Click(TObject *Sender)
{
IBQuery1->SQL->Clear();
IBQuery1->SQL->Add("Select * from Register");
IBQuery1->Open();
}
//---------------------------------------------------------------------------
void __fastcall TFormReg::ComboBox1Change(TObject *Sender)
{
if(ComboBox1->ItemIndex==0) //ID
Otbor(1);
if(ComboBox1->ItemIndex==1) //????
Otbor(2);
if(ComboBox1->ItemIndex==2) //??????????
{
ComboBox2->Clear();
IBQuery3->SQL->Clear();
IBQuery3->SQL->Add("Select Distinct Customer As Par From Register");
IBQuery3->Open();
while (!IBQuery3->Eof)
{ ComboBox2->Items->Add(IBQuery3->FieldByName("Par")->AsString);
IBQuery3->Next();
}
ComboBox2->ItemIndex=0;
Otbor(3);
}
if(ComboBox1->ItemIndex==3) //?????
Otbor(1);
if(ComboBox1->ItemIndex==4) //?????????
{
ComboBox2->Clear();
IBQuery3->SQL->Clear();
IBQuery3->SQL->Add("Select name from Processors where id IN (Select Distinct Proc From Register)");
IBQuery3->Open();
while (!IBQuery3->Eof)
{ ComboBox2->Items->Add(IBQuery3->FieldByName("name")->AsString);
IBQuery3->Next();
}
ComboBox2->ItemIndex=0;
Otbor(3);
}
if(ComboBox1->ItemIndex==5) //???. ?????
{
ComboBox2->Clear();
IBQuery3->SQL->Clear();
IBQuery3->SQL->Add("Select name from Matplatas where id IN (Select Distinct Matpl From Register)");
IBQuery3->Open();
while (!IBQuery3->Eof)
{ ComboBox2->Items->Add(IBQuery3->FieldByName("name")->AsString);
IBQuery3->Next();
}
ComboBox2->ItemIndex=0;
Otbor(3);
}
if(ComboBox1->ItemIndex==6) //??????
{
ComboBox2->Clear();
IBQuery3->SQL->Clear();
IBQuery3->SQL->Add("Select name from Memorys where id IN (Select Distinct Mem From Register)");
IBQuery3->Open();
while (!IBQuery3->Eof)
{ ComboBox2->Items->Add(IBQuery3->FieldByName("name")->AsString);
IBQuery3->Next();
}
ComboBox2->ItemIndex=0;
Otbor(3);
}
if(ComboBox1->ItemIndex==7) //???????
{
ComboBox2->Clear();
IBQuery3->SQL->Clear();
IBQuery3->SQL->Add("Select name from Monitors where id IN (Select Distinct Mon From Register)");
IBQuery3->Open();
while (!IBQuery3->Eof)
{ ComboBox2->Items->Add(IBQuery3->FieldByName("name")->AsString);
IBQuery3->Next();
}
ComboBox2->ItemIndex=0;
Otbor(3);
}
}
//---------------------------------------------------------------------------
void __fastcall TFormReg::Edit5KeyPress(TObject *Sender, char &Key)
{
if(((Key<'0')||(Key>'9'))&&(Key!='.')) {Key=0;Beep();}
}
//---------------------------------------------------------------------------
?????????? ? (??????????)
????????????????? ??????
1. ????????????? ?.?. ???????????????? ? C++Builder 6. - ?.: "???????????? ?????", 2003 - 1152?.
2. ???? ?.?. ?????????????? ? ????????????? ??? ??????: ??????? .- ?.: ??????? ? ??????????, 1995 3. ???????? ?.?. ?????? ?????????????? ??????????? ??? ?????? .- ???.: ?????
4. ?????? ?.,?????? ?. ???? ??????: ?????????? ? ??????????.- ?.:?????, 1999 3
??? ???? ? ???????? ??????? ????
Документ
Категория
Без категории
Просмотров
19
Размер файла
821 Кб
Теги
отчет_практ
1/--страниц
Пожаловаться на содержимое документа