*ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
*³                                                               ³
*³ Programm :Adressen                                       ³
*³ Autor    :Bernd Haase                                                       ³
*³ Inhaber  :Bernd Haase                                                       ³
*³ Straáe   :Eichenweg 3 a                                                   ³
*³ Wohnort  :2858 Schiffdorf-Wehdel                                 ³
*³ Telefon  :04749-8238                                                ³
*³ FAX      :04749-8238                                                ³
*ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
#include io.hdr
#include date.hdr
#include system.hdr
#include string.hdr
#include database.hdr
#include colors.hdr
#include data.hdr
#include fileio.hdr
#include memo.hdr
#include browse.hdr
#include keys.hdr
#define clrmemo "GR+/BR"
#pragma w_func_proc-
#pragma w_get_local-
#pragma w_precision-
#pragma w_indirect-
*
* Datenbankdefinitionen
dbfdef Adressen
char(25)     vorname
char(25)     strasse
char(25)     ort
char(16)     telefon
char(16)     fax
dbl(10: 2)     op
char(25)     name
enddef
indexdef
char(25)     name                          Adressen->name
char(16)     fax                           Adressen->fax
vardef
logical loesch
Procedure Daten_drucken_Adressen
endpro
function uint Tabelle_I_Adressen
parameters value ulong   ulAdress, ;
value  uint   uiCallType, ;
char   chSayString
uint    uiEditScreen
uint    uiMouseRow
uint    uiMouseCol
ulong   ulKorrRecord
char(5) chMouseString
dbl     dblBetragBackup
if uiCallType = 0
chsaystring = ''
chsaystring = chsaystring + Adressen->vorname+' ³'
chsaystring = chsaystring + Adressen->strasse+' ³'
chsaystring = chsaystring + Adressen->ort+' ³'
chsaystring = chsaystring + Adressen->telefon+' ³'
chsaystring = chsaystring + Adressen->fax+' ³'
chsaystring = chsaystring + str(Adressen->op,10, 2)+' ³'
chsaystring = chsaystring + Adressen->name+' ³'
return 0
else
if lastkey()=&K_ESC
return 3
endif
Procedure Tabelle_II_Adressen
byte    bColor[3]
char(74)  chTitel[3]
char(74)  chFuss
char    chFields
ulong   ulTopRecord
ulong   ulBottomRecord
save_screen
chfields = space(75)
chfuss = 'Ende mit ESC'
chtitel[0]='Adressendatei'
chtitel[1]=''
chtitel[2]=''
bcolor[0]=&black_light_grey
bcolor[1]=&white_black
bcolor[2]=&black_light_green
browse(Adressen,10,05,18,76,chtitel[],chfuss,chfields,bcolor[],1,0,0,Tabelle_I_Adressen)
restore_area
Procedure Daten_Aus_Adressen
@ 6, 5 say "Vorname                :"
@ row(),col() say Adressen->vorname picture "XXXXXXXXXXXXXXXXXXXXXXXXX"
@ 7, 5 say "Straáe                 :"
@ row(),col() say Adressen->strasse picture "XXXXXXXXXXXXXXXXXXXXXXXXX"
@ 8, 5 say "Wohnort                :"
@ row(),col() say Adressen->ort picture "XXXXXXXXXXXXXXXXXXXXXXXXX"
@ 9, 5 say "Telefon                :"
@ row(),col() say Adressen->telefon picture "XXXXXXXXXXXXXXXX"
@10, 5 say "FAX                    :"
@ row(),col() say Adressen->fax picture "XXXXXXXXXXXXXXXX"
@12, 5 say "Offene Posten          :"
@ row(),col() say Adressen->op picture "9999999.99"
@ 5, 5 say "Name                   :"
@ row(),col() say Adressen->name picture "XXXXXXXXXXXXXXXXXXXXXXXXX"
if deleted()
@ 21,02 say 'Gelscht'
@ 21,02 say '±±±±±±±±'
Procedure Daten_Ein_Adressen
@ 6,29 get Adressen->vorname picture "XXXXXXXXXXXXXXXXXXXXXXXXX"
@ 7,29 get Adressen->strasse picture "XXXXXXXXXXXXXXXXXXXXXXXXX"
@ 8,29 get Adressen->ort picture "XXXXXXXXXXXXXXXXXXXXXXXXX"
@ 9,29 get Adressen->telefon picture "XXXXXXXXXXXXXXXX"
@10,29 get Adressen->fax picture "XXXXXXXXXXXXXXXX"
@12,29 get Adressen->op picture "9999999.99"
@ 5,29 get Adressen->name picture "XXXXXXXXXXXXXXXXXXXXXXXXX"
read
Procedure Datenbank_open_Adressen
if .not. exist('Adressen.dbf')
build 'Adressen.dbf' from alias Adressen
open Adressen
index name
index fax
set order to 1
go top
Procedure Steuer_Adressen
int wahl,i_wahl
char(25) zname
char(16) zfax
set color to "b+/w","/w","b+/w"
clear
store .f. to loesch
Datenbank_open_Adressen()
if iscolor()
fill(1,1,23,79,&double_box,"±",&blue_green,&blue_green,6)
fill(1,1,23,79,&double_box,"±",0,1,6)
@ 4, 4 clear to 13,54
@ 4, 4 to 13,54
@ 1,3 say ">>Arbeitsblatt Adressen<<"
do while .t.
daten_aus_Adressen
@ 24,01 say "Befehle: Eingeben ndern Lschen Tabelle Suchen Index Drucken + - Hauptmen"
@ 24,10 prompt "E"
@ 24,19 prompt ""
@ 24,26 prompt "L"
@ 24,34 prompt "T"
@ 24,42 prompt "S"
@ 24,49 prompt "I"
@ 24,55 prompt "D"
@ 24,63 prompt "+"
@ 24,65 prompt "-"
@ 24,67 prompt "H"
menu to wahl
do case
case wahl=1
append blank
daten_ein_Adressen
case wahl=2
case wahl=3
recall
delete
store .t. to loesch
case wahl=4
do Tabelle_II_Adressen
case wahl=5
if I_wahl= 1
store Adressen->name                      to zname
@  5,29 get zname
seek zname
if .not. found()
no_burn_key("Datum nicht gefunden")
if I_wahl= 2
store Adressen->fax                       to zfax
@ 10,29 get zfax
seek zfax
case wahl=6
do save_screen
@ 23, 2 prompt 'NAME'
@ 23, 7 prompt 'FAX'
menu to i_wahl
if i_wahl= 1
set order to  1
if i_wahl= 2
set order to  2
do restore_area
case wahl=7
do Daten_drucken_Adressen
case wahl=8
skip
if eof()
go bottom
case wahl=9
skip -1
if bof()
case wahl=10
if loesch
pack
close all
set color to
quit
endcase
enddo
Procedure FCO_Main
set date german
Steuer_Adressen()