Смекни!
smekni.com

База данный Хозяйственный учет футбольного клуба (стр. 6 из 6)

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