Список использованных источников
Поможем в ✍️ написании учебной работы
Поможем с курсовой, контрольной, дипломной, рефератом, отчетом по практике, научно-исследовательской и любой другой работой

 

1. Атре, Ш., Структурный подход к организации баз данных. / [Текст] : Атре, Ш. - М.: Финансы и статистика, 1983. – 320 с.

2. Бойко, В.В., Проектирование баз данных информационных систем. / [Текст] : Бойко, В.В., Савинков, В.М., – М.: Финансы и статистика, 1989. – 351 с.

3. Гарсия-Молина, Гектор, Ульман, Джеффри, Д., Уидом, Дженнифер Системы баз данных. Полный курс. : Пер. с англ. – М. : Издательский дом “Вильямс”, 2003. – 188 с. : ил.

4. Дейт, К., Руководство по реляционной СУБД DB2. / [Текст] : Дейт, К. – М.: Финансы и статистика, 1988. – 320 с.

5. Джексон, Г., Проектирование реляционных баз данных для использования с микроЭВМ. / [Текст] : Джексон, Г., -М.: Мир, 1991. – 252 с.

6. Кириллов, В.В., Структуризованный язык запросов (SQL). / [Текст] : Кириллов, В.В., – СПб.: ИТМО, 1994. – 80 с.

7. Мартин, Дж., Планирование развития автоматизированных систем. / [Текст] : Мартин, Дж., – М.: Финансы и статистика, 1984. – 196 с.

8. Мейер, М., Теория реляционных баз данных. / [Текст] : Мейер, М.,– М.: Мир, 1987. – 608 с.

9. Тиори, Т., Проектирование структур баз данных. / [Текст] : Тиори, Т., Фрай, Дж., В 2 кн., – М.: Мир, 1985. Кн. 1. – 287 с.: Кн. 2. – 320 с.

10. Ульман, Дж., Базы данных на Паскале. / [Текст] : Ульман, Дж., – М.: Машиностроение, 1990. – 386 с.

11.  Хаббард, Дж., Автоматизированное проектирование баз данных. / [Текст] : Хаббард, Дж., – М.: Мир, 1984. – 294 с.

12.  Цикритизис, Д., Модели данных. / [Текст] : Цикритизис, Д., Лоховски, Ф., – М.: Финансы и статистика, 1985. – 344 с.


 


Приложение А

 

Текст обработчиков событий, связанных с компонентами формы «Инвентарные номера инвентаря»

 

А.1 Код, связанный с событием Click кнопок «След.» и «Пред.»

 

* Next IF NOT EOF()

SKIP

IF EOF()

GO BOTTOM

ЕNDIF

ENDIF

THISFORM.Refresh

THISFORM.Buttons

* Previous IF NOT BOF()

SKIP - 1

IF BОF()

G0 TOP

EHDIF

ЕNDIF

THISFORM.Refresh:

THISFORM.Buttons

 

А.2 Код, связанный с событием Click кнопки «Найти»

 

IF NOT USED([Invnum_inv])

 USE Invnum_inv IN 0

ENDIF

IF thisform.container1.text1.Value=" "

ELSE

SELECT Invnum_inv

SET ORDER TO inv_number

LOCATE FOR

(ALLTRIM(inv_number))=ALLTRIM(thisform.container1.text1.value)

IF FOUND()

SEEK inv_number

ENDIF

thisform.refresh

ENDIF

 

А.3 Код, связанный с событием Click кнопки «Новая запись»

 

IF NOT USED([inventar])

USE inventar IN 0

ENDIF

IF NOT USED([Invnum_inv])

USE Invnum_inv IN 0

ENDIF

IF NOT USED([Arrival_object])

USE Arrival_object IN 0

ENDIF

thisform.Visible= .F.

SET RELATION TO

SET SKIP TO

SELECT Inventar

SET ORDER TO code_obj

SELECT Invnum_inv

SET RELATION TO code_obj INTO Inventar

SET SKIP TO Inventar

DO FORM "c:\documents and settings\yla\мои документы\visual foxpro projects\my_football_new\f_inventar.scx"

 

А.4 Код, связанный с событием Click кнопки «Сохранить»

 

thisform.container2.command1.Enabled=.T.

SELECT invnum_inv

GO RECCOUNT()

IF (invnum_inv.inv_number!=' ')

thisform.Command1.Enabled=.T.

ELSE

MESSAGEBOX("Введите все данные!!!",16, "Ошибка")

ENDIF

 

А.5 Код, связанный с событием Click кнопки «Отмена»

 

thisform.Height= 260

thisform.container1.command3.Enabled=.t.

thisform.container2.command1.Enabled=.t.

thisform.container2.command2.Enabled=.t.

thisform.container2.command5.Enabled=.t.

thisform.container3.command4.Enabled=.t.

thisform.container3.command3.Enabled=.t.

thisform.container3.command6.Enabled=.f.

 

А.6 Код, связанный с событием Click кнопки «Удалить»

 

IF MESSAGEBOX ("Удалить эту запись", 4 + 32 + 256 ) = 6

DELETE NEXT 1

BLANK

SET DELETED ON

GO TOP

THISFORM.Refresh

ENDIF

 

А.7 Код, связанный с событием Click кнопки «Просмотр»

 

IF NOT USED([Arrival_object])

USE Arrival_object IN 0

ENDIF

IF NOT USED([inventar])

USE inventar IN 0

ENDIF

IF NOT USED([Invnum_inv])

USE Invnum_inv IN 0

ENDIF

thisform.Height= 454

thisform.container3.command6.Enabled=.t.

thisform.container1.command3.Enabled=.f.

thisform.container2.command1.Enabled=.f.

thisform.container2.command2.Enabled=.f.

thisform.container2.command5.Enabled=.f.

thisform.container3.command4.Enabled=.f.

thisform.container3.command3.Enabled=.f.

 


Приложение Б

 

Текст программы обработчика событий «Запрос» на форме «Универсальный запрос»

 

IF NOT USED([arrival_object])

USE arrival_object IN 0

ENDIF

IF NOT USED([inventar])

USE inventar IN 0

ENDIF

IF NOT USED([invnum_inv])

USE invnum_inv IN 0

ENDIF

IF NOT USED([gate])

USE gate IN 0

ENDIF

IF thisform.container2.txt_height_gate.Value=" "

thisform.container2.txt_height_gate.Value=""

ENDIF

str="(2<>1)"

out_fields="gate.code_obj"

IF thisform.ch_code.Value = 1

 out_fields ="gate.code_obj"

ENDIF

IF thisform.ch_date_arrival.Value= 1

out_fields = out_fields +", arrival_object.date"

ENDIF

IF thisform.ch_balance.Value = 1

out_fields = out_fields +", arrival_object.balance"

ENDIF

IF thisform.ch_kol.Value = 1

 out_fields = out_fields +", arrival_object.kol"

ENDIF

IF thisform.ch_firm.Value = 1

out_fields = out_fields +", inventar.firm"

ENDIF

IF thisform.ch_model.Value = 1

 out_fields = out_fields +", inventar.model"

ENDIF

IF thisform.ch_inv_number.Value = 1

out_fields = out_fields +", invnum_inv.inv_number"

ENDIF

IF thisform.container2.ch_height_gate.Value = 1

out_fields = out_fields +", gate.height_gate"

ENDIF

IF thisform.container2.ch_kind_gate.Value = 1

out_fields = out_fields +", gate.kind"

ENDIF

IF thisform.container2.Ch_shirina_gate.Value = 1

out_fields = out_fields +", gate.shirina"

ENDIF

IF ALLTRIM(thisform.txt_code_obj.Value) == ""

ELSE

str = str +" AND "+

"((ALLTRIM(gate.code_obj))=ALLTRIM(thisform.txt_code_obj.Value))"

ENDIF

IF ALLTRIM(thisform.txt_date_arrival.Value) == ""

ELSE

str = str +" AND "+

"((ALLTRIM(DTOC(arrival_object.date)))=ALLTRIM(thisform.txt_date_arrival.Value))"

ENDIF

IF ALLTRIM(thisform.txt_balance.Value) == ""

ELSE

str = str +" AND "+

"((ALLTRIM(STR(arrival_object.balance)))=ALLTRIM(thisform.txt_balance.Value))"

ENDIF

IF ALLTRIM(thisform.txt_kol.Value) == ""

ELSE

str = str +" AND "+

((ALLTRIM(STR(arrival_object.kol)))=ALLTRIM(thisform.txt_kol.Value))

ENDIF

IF ALLTRIM(thisform.txt_firm.Value )== ""

ELSE

str = str +" AND "+

((ALLTRIM(inventar.firm))=ALLTRIM(thisform.txt_firm.Value))

ENDIF

IF ALLTRIM(thisform.txt_model.Value) == ""

ELSE

str = str +" AND "+

"((ALLTRIM(inventar.model))=ALLTRIM(thisform.txt_model.Value))"

ENDIF

IF ALLTRIM(thisform.container2.txt_kind_gate.Value) == ""

 ELSE

 str = str +" AND "+

"((ALLTRIM(gate.kind))=ALLTRIM(thisform.container2.txt_kind_gate.Value))"

ENDIF

IF ALLTRIM(thisform.container2.txt_height_gate.Value) == ""

ELSE

str = str +" AND "+ "((ALLTRIM(STR(gate.height_gate)))

=thisform.container2.txt_height_gate.Value)"

ENDIF

IF ALLTRIM(thisform.container2.txt_shirina_gate.Value)== ""

ELSE

 str = str +" AND "+ "((ALLTRIM(STR(gate.shirina)))=

=ALLTRIM(thisform.container2.txt_shirina_gate.Value))"

ENDIF

IF out_fields="NULL"

out_fields ="*"

ENDIF

SELECT &out_fields;

FROM(((gate INNER JOIN inventar ON

ALLTRIM(inventar.code_obj)==ALLTRIM(gate.code_obj));

INNER JOIN arrival_object ON

ALLTRIM(arrival_object.code_obj)==ALLTRIM(gate.code_obj));

INNER JOIN invnum_inv ON

ALLTRIM(invnum_inv.code_obj)==ALLTRIM(gate.code_obj));

WHERE &str INTO TABLE My_tab

objExcel=CreateObject("Excel.Application")

objExcel.Visible=.T.

objExcel.Workbooks.add

nstol = 0

IF thisform.ch_code.Value = 1

nstol = nstol+1

objExcel.Cells(3,nstol).select

objExcel.Cells(3,nstol).Font.Bold=.T.

objExcel.Cells(3,nstol).Value="Код партии"

objExcel.Columns[nstol].ColumnWidth = 12

ENDIF

IF thisform.ch_date_arrival.Value= 1

nstol = nstol+1

objExcel.Cells(3,nstol).select

objExcel.Cells(3,nstol).Font.Bold=.T.

objExcel.Cells(3,nstol).Value="Дата поступления"

objExcel.Columns[nstol].ColumnWidth = 18

ENDIF

IF thisform.ch_balance.Value = 1

nstol = nstol+1

objExcel.Cells(3,nstol).select

objExcel.Cells(3,nstol).Font.Bold=.T.

objExcel.Cells(3,nstol).Value="Балансовая стоимость"

objExcel.Columns[nstol].ColumnWidth = 25

ENDIF

IF thisform.ch_kol.Value = 1

nstol = nstol+1

objExcel.Cells(3,nstol).select

objExcel.Cells(3,nstol).Font.Bold=.T.

objExcel.Cells(3,nstol).Value="Количество"

objExcel.Columns[nstol].ColumnWidth = 12

ENDIF

IF thisform.ch_firm.Value = 1

nstol = nstol+1

objExcel.Cells(3,nstol).select

objExcel.Cells(3,nstol).Font.Bold=.T.

objExcel.Cells(3,nstol).Value="Фирма-производитель"

objExcel.Columns[nstol].ColumnWidth = 25

ENDIF

IF thisform.ch_model.Value = 1

nstol = nstol+1

objExcel.Cells(3,nstol).select

objExcel.Cells(3,nstol).Font.Bold=.T.

objExcel.Cells(3,nstol).Value="Модель"

objExcel.Columns[nstol].ColumnWidth = 10

ENDIF

IF thisform.ch_inv_number.Value = 1

nstol = nstol+1

objExcel.Cells(3,nstol).select

objExcel.Cells(3,nstol).Font.Bold=.T.

objExcel.Cells(3,nstol).Value="Инвентарный номер"

objExcel.Columns[nstol].ColumnWidth = 25

ENDIF

IF thisform.container2.ch_height_gate.Value = 1

nstol = nstol+1

objExcel.Cells(3,nstol).select

objExcel.Cells(3,nstol).Font.Bold=.T.

objExcel.Cells(3,nstol).Value="Высота ворот"

objExcel.Columns[nstol].ColumnWidth = 15

ENDIF

IF thisform.container2.ch_kind_gate.Value = 1

nstol = nstol+1

objExcel.Cells(3,nstol).select

objExcel.Cells(3,nstol).Font.Bold=.T.

objExcel.Cells(3,nstol).Value="Вид ворот"

objExcel.Columns[nstol].ColumnWidth = 20

ENDIF

IF thisform.container2.Ch_shirina_gate.Value = 1

nstol = nstol+1

objExcel.Cells(3,nstol).select

objExcel.Cells(3,nstol).Font.Bold=.T.

objExcel.Cells(3,nstol).Value="Ширина ворот"

objExcel.Columns[nstol].ColumnWidth = 15

ENDIF

IF nstol>0

tt1 = ""+CHRTRAN(objExcel.Cells(1,1).Address,"$","")

tt2 = ""+CHRTRAN(objExcel.Cells(1,nstol).Address,"$","")

WITH objExcel&&cel

WITH .Range(tt1+":"+tt2)

WITH .Font

Name = "Arial Cyr"

FontStyle = "полужирный"

Size = 14

ENDWITH

HorizontalAlignment = 3

VerticalAlignment = 1

WrapText = .F.

Orientation = 0

AddIndent = .F.

IndentLevel = 0

ShrinkToFit = .F.

MergeCells = .F.

Merge

ENDWITH

Range("A1").Value = "Данные о партиях футбольных ворот"

ENDWITH

ENDIF

stroka=3

stolbic=1

SELECT my_tab

SCAN

stroka=stroka+1

temp_j = stolbic

IF thisform.ch_code.Value = 1

objExcel.Cells(stroka,temp_j ).select

objExcel.Cells(stroka,temp_j ).Value = my_tab.code_obj

temp_j = temp_j +1

ENDIF

IF thisform.ch_date_arrival.Value= 1

objExcel.Cells(stroka,temp_j ).select

objExcel.Cells(stroka,temp_j ).Value = my_tab.date

temp_j = temp_j +1

ENDIF

IF thisform.ch_balance.Value = 1

objExcel.Cells(stroka,temp_j ).select

objExcel.Cells(stroka,temp_j ).Value = my_tab.balance

temp_j = temp_j +1

ENDIF

IF thisform.ch_kol.Value = 1

objExcel.Cells(stroka,temp_j ).select

objExcel.Cells(stroka,temp_j ).Value =my_tab.kol

temp_j = temp_j +1

ENDIF

IF thisform.ch_firm.Value = 1

objExcel.Cells(stroka,temp_j ).select

objExcel.Cells(stroka,temp_j ).Value = my_tab.firm

temp_j = temp_j +1

ENDIF

IF thisform.ch_model.Value = 1

objExcel.Cells(stroka,temp_j ).select

objExcel.Cells(stroka,temp_j ).Value = my_tab.model

temp_j = temp_j +1

ENDIF

IF thisform.ch_inv_number.Value = 1

objExcel.Cells(stroka,temp_j ).select

objExcel.Cells(stroka,temp_j ).Value = my_tab.inv_number

temp_j = temp_j +1

ENDIF

IF thisform.container2.ch_height_gate.Value = 1

objExcel.Cells(stroka,temp_j ).select

objExcel.Cells(stroka,temp_j ).Value = STR(my_tab.height_gate)

temp_j = temp_j +1

ENDIF

IF thisform.container2.ch_kind_gate.Value = 1

objExcel.Cells(stroka,temp_j ).select

objExcel.Cells(stroka,temp_j ).Value =my_tab.kind

temp_j = temp_j +1

ENDIF

IF thisform.container2.Ch_shirina_gate.Value = 1

objExcel.Cells(stroka,temp_j ).select

objExcel.Cells(stroka,temp_j ).Value =STR(my_tab.shirina)

temp_j = temp_j +1

ENDIF

ENDSCAN

IF nstol>0

tt1 = ""+CHRTRAN(objExcel.Cells(3,1).Address,"$","")

tt2 = ""+CHRTRAN(objExcel.Cells(stroka,nstol).Address,"$","")

WITH objExcel

WITH .Range(tt1+":"+tt2)

WITH .Font

.Name = "Arial Cyr"

Size = 10

ENDWITH

HorizontalAlignment = 3

ENDWITH

ENDWITH

ENDIF

With objExcel.Range(tt1+":"+tt2)

Borders(1).LineStyle = 0

Borders(2).LineStyle = 0

With .Borders(1)

LineStyle = 1

Weight = 2

ENDWITH

With .Borders(2)

Weight = 2

ENDWITH

With .Borders(3)

LineStyle = 1

Weight = 2

ENDWITH

With .Borders(4)

LineStyle = 1

Weight = 2

ENDWITH

ENDWITH

 


Приложение В

 

Текст программы для заполнения таблиц записями

 

IF NOT USED([Arrival_object])

USE Arrival_object IN 0

ENDIF

IF NOT USED([inventar])

USE inventar IN 0

ENDIF

IF NOT USED([out_inventar])

USE out_inventar IN 0

ENDIF

IF NOT USED([techno])

USE techno IN 0

ENDIF

IF NOT USED([firm_techno])

 USE firm_techno IN 0

ENDIF

IF NOT USED([firm_inv])

USE firm_inv IN 0

ENDIF

IF NOT USED([techno_model])

USE techno_model IN 0

ENDIF

IF NOT USED([Mebel])

USE Mebel IN 0

ENDIF

IF NOT USED([invnum_inv])

USE invnum_inv IN 0

ENDIF

IF NOT USED([invnum_tec])

USE invnum_tec IN 0

ENDIF

IF NOT USED([invnum_meb])

USE invnum_meb IN 0

ENDIF

IF NOT USED([datevidachi_table])

USE datevidachi_table IN 0

ENDIF

IF NOT USED([balls])

USE balls IN 0

ENDIF

IF NOT USED([gate])

USE gate IN 0

ENDIF

IF NOT USED([kind_gate])

USE kind_gate IN 0

ENDIF

IF NOT USED([shir_and_height_gate])

USE shir_and_height_gate IN 0

ENDIF

IF NOT USED([trenager])

USE trenager IN 0

ENDIF

IF NOT USED([TV])

USE TV IN 0

ENDIF

IF NOT USED([refrigerator])

USE refrigerator IN 0

ENDIF

IF NOT USED([vacuum_cleaner])

USE vacuum_cleaner IN 0

ENDIF

IF NOT USED([bed])

USE bed IN 0

ENDIF

IF NOT USED([shkaf])

USE shkaf IN 0

ENDIF

IF NOT USED([table])

USE table IN 0

ENDIF

IF NOT USED([tumbochka])

USE tumbochka IN 0

ENDIF

j=0

k=0

SELECT arrival_object

FOR i=1 TO 1200000

APPEND BLANK

replace code_obj WITH ALLTRIM(STR(i))

k=k+1

IF(k<10)

k = k+1

ELSE

k =5

ENDIF

replace kol WITH k

replace balance WITH k*5.8

SELECT datevidachi_table

IF NOT EOF()

replace arrival_object.date WITH date_v

SKIP

ELSE

SKIP -(RECNO())

replace arrival_object.date WITH date_v

SKIP

ENDIF

SELECT arrival_object

ENDFOR

**************************************

kol=0

j=1

SELECT arrival_object

GO 1

DO WHILE NOT EOF()

SELECT inventar

APPEND BLANK

replace code_obj WITH arrival_object.code_obj

kol = arrival_object.kol

SELECT invnum_inv

DO WHILE (kol!=0)

APPEND BLANK

replace inv_number WITH STR(j)

replace code_obj WITH arrival_object.code_obj

j=j+1

kol=kol-1

ENDDO

SELECT firm_inv

IF NOT EOF()

replace inventar.firm WITH firm_inv

SKIP

ELSE

GO 1

replace inventar.firm WITH firm_inv

SKIP

ENDIF

SELECT techno_model

IF NOT EOF()

replace inventar.model WITH model

SKIP

ELSE

GO 1

replace inventar.model WITH model

SKIP

ENDIF

********

SELECT Arrival_object

SKIP

IF NOT EOF()

SELECT Techno

APPEND BLANK

replace code_obj WITH arrival_object.code_obj

SELECT firm_techno

IF NOT EOF()

replace Techno.firm_marka WITH firm_marka

SKIP

ELSE

GO 1

replace Techno.firm_marka WITH firm_marka

SKIP

ENDIF

SELECT techno_model

IF NOT EOF()

replace Techno.model WITH model

SKIP

ELSE

GO 1

replace Techno.model WITH model

SKIP

ENDIF

*********

SELECT Arrival_object

SKIP

IF NOT EOF()

SELECT Mebel

APPEND BLANK

replace code_obj WITH arrival_object.code_obj

********

SELECT Arrival_object

SKIP

ENDIF

ENDIF

ENDDO

&&заполнение таблиц "Спортивный инвентарь"

SELECT inventar

GO 1

DO WHILE NOT EOF()

SELECT balls

APPEND BLANK

replace code_obj WITH inventar.code_obj

********

SELECT inventar

SKIP

IF NOT EOF()

SELECT gate

APPEND BLANK

replace code_obj WITH inventar.code_obj

SELECT kind_gate

IF NOT EOF()

replace gate.kind WITH kind_gate

SKIP

ELSE

GO 1

replace gate.kind WITH kind_gate

SKIP

ENDIF

SELECT shir_and_height_gate

IF NOT EOF()

replace gate.height_gate WITH height

replace gate.shirina WITH shirina

SKIP

ELSE

GO 1

replace gate.height_gate WITH height

replace gate.shirina WITH shirina

SKIP

ENDIF

*********

SELECT inventar

SKIP

IF NOT EOF()

SELECT trenager

APPEND BLANK

replace code_obj WITH inventar.code_obj

SELECT inventar

SKIP

ENDIF

ENDIF

ENDDO

&&заполнение таблиц "Техника"

SELECT techno

GO 1

DO WHILE NOT EOF()

SELECT TV

APPEND BLANK

replace code_obj WITH techno.code_obj

********

SELECT techno

SKIP

IF NOT EOF()

SELECT refrigerator

APPEND BLANK

replace code_obj WITH techno.code_obj

*********

SELECT Techno

SKIP

IF NOT EOF()

SELECT vacuum_cleaner

APPEND BLANK

replace code_obj WITH techno.code_obj

********

SELECT techno

SKIP

ENDIF

ENDIF

ENDDO

&&заполнение таблиц "Мебель"

SELECT Mebel

GO 1

DO WHILE NOT EOF()

SELECT bed

APPEND BLANK

replace code_obj WITH Mebel.code_obj

********

SELECT Mebel

SKIP

IF NOT EOF()

SELECT shkaf

APPEND BLANK

replace code_obj WITH mebel.code_obj

*********

SELECT Mebel

SKIP

IF NOT EOF()

SELECT table

APPEND BLANK

replace code_obj WITH mebel.code_obj

********

SELECT Mebel

SKIP

IF NOT EOF()

SELECT tumbochka

APPEND BLANK

replace code_obj WITH mebel.code_obj

SELECT Mebel

SKIP

ENDIF

ENDIF

ENDIF

ENDDO

&&Заполнение таблиц "инвентарный номер"

kol=0

SELECT inventar

GO 1

SELECT invnum_inv

GO 1

SELECT techno

GO 1

SELECT mebel

GO 1

SELECT arrival_object

GO 1

&&Заполнение таблиц списанных "объектов"

SELECT invnum_inv

DO WHILE NOT EOF()

SELECT out_inventar

APPEND BLANK

replace inv_number WITH invnum_inv.inv_number

SELECT invnum_inv

SKIP 10

ENDDO

IF NOT USED([invnum_inv])

USE invnum_inv IN 0

ENDIF

IF NOT USED([inv_in_zal])

USE inv_in_zal IN 0

ENDIF

IF NOT USED([type_zal])

USE type_zal IN 0

ENDIF

IF NOT USED([pomeshenie])

USE pomeshenie IN 0

ENDIF

IF NOT USED([zal])

USE zal IN 0

ENDIF

IF NOT USED([pomeshenie_naznach])

USE pomeshenie_naznach IN 0

ENDIF

IF NOT USED([datevidachi_table])

USE datevidachi_table IN 0

ENDIF

SELECT pomeshenie

DELETE ALL

PACK

SELECT zal

DELETE ALL

PACK

SELECT inv_in_zal

DELETE ALL

PACK

SELECT pomeshenie_naznach

GO 1

SELECT pomeshenie

FOR i=1 TO 2000

APPEND BLANK

replace pomeshenie.num_p WITH i

SELECT pomeshenie_naznach

IF NOT EOF()

replace pomeshenie.naznach WITH naznach

SKIP

ELSE

SKIP -(RECNO())

replace pomeshenie.naznach WITH naznach

SKIP

ENDIF

*******************

IF ALLTRIM(pomeshenie.naznach)="Спортивный зал"

SELECT zal

APPEND BLANK

replace num_p WITH pomeshenie.num_p

SELECT type_zal

IF NOT EOF()

replace zal.type_zal WITH type_zal

SKIP

ELSE

SKIP -(RECNO())

replace zal.type_zal WITH type_zal

SKIP

ENDIF

ENDIF

**************

SELECT pomeshenie

ENDFOR

SELECT invnum_inv

GO 1

DO WHILE NOT EOF()

SELECT inv_in_zal

APPEND blank

replace inv_number WITH invnum_inv.inv_number

SELECT invnum_inv

SKIP

SELECT zal

IF NOT EOF()

replace inv_in_zal.num_p WITH num_p

SKIP

ELSE

SKIP -(RECNO())

replace inv_in_zal.num_p WITH num_p

SKIP

ENDIF

SELECT datevidachi_table

IF NOT EOF()

replace inv_in_zal.date WITH date_v

SKIP

ELSE

SKIP -(RECNO())

replace inv_in_zal.date WITH date_v

SKIP

ENDIF

SELECT invnum _ inv

ENDDO

В3. Заполнение таблиц «Общая информация и игроки»

IF NOT USED([Person])

USE Person IN 0

ENDIF

IF NOT USED([fam_table])

USE fam_table IN 0

ENDIF

IF NOT USED([im_table])

USE im_table IN 0

ENDIF

IF NOT USED([otch_table])

USE otch_table IN 0

ENDIF

IF NOT USED([datevidachi_table])

USE datevidachi_table IN 0

ENDIF

IF NOT USED([dateborn])

USE dateborn IN 0

ENDIF

IF NOT USED([Country])

USE Country IN 0

ENDIF

IF NOT used([street])

USE street IN 0

ENDIF

SELECT Person

*GO 1

FOR i=1000 TO 1010

FOR j=100000 TO 100010

APPEND BLANK

replace sp WITH i

replace np WITH j

replace numstreet WITH i-990

replace numflat WITH j-99990

SELECT Fam_table

IF EOF()

SKIP -(RECNO())

replace Person.fam WITH fam

SKIP

ELSE

replace Person.fam WITH fam

SKIP

ENDIF

SELECT Im_table

IF EOF()

SKIP -(RECNO())

replace Person.im WITH im

skip

ELSE

replace Person.im WITH im

SKIP

ENDIF

SELECT Otch_table

IF EOF()

SKIP -(RECNO())

replace Person.otch WITH otch

skip

ELSE

replace Person.otch WITH otch

SKIP

ENDIF

SELECT Datevidachi_table

IF EOF()

SKIP -(RECNO())

replace Person.datevidachi WITH date_v

skip

ELSE

replace Person.datevidachi WITH date_v

SKIP

ENDIF

SELECT Country

IF EOF()

SKIP -(RECNO())

replace Person.country WITH country

replace Person.city WITH city

ELSE

replace Person.country WITH country

replace Person.city WITH city

SKIP

ENDIF

SELECT Street

IF EOF()

SKIP -(RECNO())

replace Person.Street WITH Street

ELSE

replace Person.Street WITH Street

SKIP

ENDIF

SELECT Dateborn

IF EOF()

SKIP -(RECNO())

replace Person.dateborn WITH date_b

skip

ELSE

replace Person.dateborn WITH date_b

SKIP

ENDIF

SELECT Person

ENDFOR

ENDFOR

browse



Дата: 2019-05-28, просмотров: 170.