Автоматизированное рабочее место (OPEN)

Посмотреть архив целиком

Файл открытияOPEN.PRG

CLOSE DATA

IF !FILE('rabot.dbf')

DO create

ELSE

DO open1

ENDIF

************************************************************************************* Открытие Баз Данных и установление связей **

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

PROCEDURE open1

ON ERROR DO EROR WITH ERROR()

SELE a

USE rabot

IF .NOT. FILE( 'rabot.cdx')

INDEX ON tab TAG tab UNIQUE

INDEX ON fam TAG fam

INDEX ON n_lg TAG n_lg

INDEX ON lgot FOR lgot=.t..AND.EMPTY(dat_c).AND.EMPTY(dat_po).OR.;

BETWEEN(date(),dat_c,dat_po) TAG date

INDEX ON yl+dom+kw_ra+str(tab) FOR LGOT=.T. tag lgt

INDEX ON yl+dom+kw_ra+str(tab) FOR OR_R=1 tag ord

INDEX ON yl+dom+kw_ra+str(tab) tag adrr UNIQUE

ENDIF

SET ORDER TO adrr

SELE c

USE oplata

IF .NOT. FILE( 'oplata.cdx')

INDEX ON tab TAG tab UNIQUE

INDEX ON yl+dom+kw_ra+str(tab) TAG adr UNIQUE

ENDIF

SET ORDER TO adr

SELECT d

USE lgot

IF .NOT.FILE('lgot.cdx')

INDEX ON n_lg TAG n_lg UNIQUE

ENDIF

SET ORDER TO n_lg

SELE g

USE table_r

IF .NOT. FILE( 'table_r.cdx')

INDEX ON tab TAG tab UNIQUE

ENDIF

SET ORDER TO tab

USE HELP IN i

USE TARIF IN f

SELE rabot

SET RELA TO yl+dom+kw_ra+str(tab) INTO c

SET RELA TO n_lg INTO d addi

SET RELA TO tab INTO g addi

SET SKIP TO c,d,g

RETURN













************************************************************************************* Язык – SQL Создание Баз Данных **

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

PROCEDURE CREATE

CREATE DBF RABOT (FAM C(40),TAB N(4),TEL N(8),YL C(15),DOM C(4), KW_RA C(4),KV_M N(6,2),;

N_LG N(1),N_YD C(9),ELEC N(6),ELEC1 N(6),OR_R N(1),KOL_VO N(2),D_OPL D,OST_K N(8,2),;

PENI N(8,2),OPL_TA N(8,2), LGOT L,RAD_L L,TEL_L L,KW_L L,G_W_L L,X_W_L L,K_YS_L L,;

EL_C_L L,OTOP_L L,DAT_C D,DAT_PO D)

USE

CREATE DBF OPLATA (TAB N(4),YL C(15),DOM C(4), KW_RA C(4),KV_M N(6,2),KW_PL N(8,2),TEL_R N(8,2),;

RAD_R N(8,2),K_YSL N(8,2),OTOPL N(8,2),EL_C N(8,2),G_W N(8,2),X_W N(8,2),KW_PLL N(8,2),;

TEL_RL N(8,2),RAD_RL N(8,2),K_YSLL N(8,2),OTOPLL N(8,2),EL_CL N(8,2),G_WL N(8,2),;

X_WL N(8,2),N_LG N(1),ITOG_N N(9,2),ITOG_L N(9,2),ITOG N(9,2),OR_R N(1),KOL_VO N(2),;

SUM_KW N(8,2),SUM_GW N(8,2),SUM_XW N(8,2),SUM_KYSL N(8,2),SUM_OT N(8,2),SUM_TL N(8,2),SUM_RD N(8,2),;

SUM_IT N(9,2),LGOT L,RAD_L L,TEL_L L,KW_L L,G_W_L L,X_W_L L,K_YS_L L,EL_C_L L,OTOP_L L)

USE

CREATE DBF TABLE_R (TAB N(4),KWP_L N(5,2),TL_L N(5,2),RD_L N(5,2),GW_L N(5,2),;

XW_L N(5,2),K_L_L N(5,2),OT_L N(5,2),EL_L N(5,2))

USE

CREATE DBF LGOT (N_LG N(1),INFO C(20),KWP_L N(4,2),TL_L N(4,2),RD_L N(4,2),;

GW_L N(4,2),XW_L N(4,2),K_L_L N(4,2),OT_L N(4,2))

USE

CREATE DBF TARIF (INFO C(25),ST_KA N(5,2),K_INFO C(11),K_CH L)

USE

CREATE DBF HELP (HLP M)

APPEND BLANK

APPEND MEMO HLP FROM HELP1.TXT

APPEND BLANK

APPEND MEMO HLP FROM HELP2.TXT

APPEND BLANK

APPEND MEMO HLP FROM HELP3.TXT

APPEND BLANK

APPEND MEMO HLP FROM HELP4.TXT

APPEND BLANK

APPEND MEMO HLP FROM HELP5.TXT

APPEND BLANK

APPEND MEMO HLP FROM HELP6.TXT

APPEND BLANK

APPEND MEMO HLP FROM HELP7.TXT

APPEND BLANK

APPEND MEMO HLP FROM HELP8.TXT

USE

! del help?.txt

DO OPEN1

RETURN


П
риложение № 1.3


- 3 -


Случайные файлы

Файл
ECONEF.DOC
158332.rtf
66657.rtf
19082.rtf
139064.rtf