#include "at0200a.h"
#include "lf.h"

TOOLBAR "" 0 20 0 2
 
BUTTON DLG_SAVEREC 10 2
BEGIN
  PROMPT -14 -11 "~Registra"
  MESSAGE EXIT,K_SAVE
  PICTURE BMP_SAVEREC
  PICTURE BMP_SAVERECDN
END

BUTTON DLG_NEWREC 10 2
BEGIN
  PROMPT -24 -11 "~Nuovo"
  MESSAGE EXIT,K_INS
  PICTURE BMP_NEWREC
  PICTURE BMP_NEWRECDN
END

BUTTON DLG_CANCEL 10 2
BEGIN
  PROMPT -34 -11 "~Annulla"
  MESSAGE EXIT,K_ESC
  PICTURE 102
END

BUTTON DLG_QUIT 10 2
BEGIN
  PROMPT -44 -11 "~Fine"
  MESSAGE EXIT,K_QUIT
  PICTURE BMP_QUIT
  PICTURE BMP_QUITDN
END

ENDPAGE

PAGE "Giornaliero donazioni/controlli" -1 -1 78 20


GROUPBOX DLG_NULL 77 6
BEGIN
  PROMPT 1 0 "Dati fissi"
  FLAGS "R"
END

DATE F_DATADON
BEGIN
   PROMPT 2 1 "Data donazione  "
   VALIDATE NOT_EMPTY_FUNC
   CHECKTYPE REQUIRED
   HELP "Data donazione"
END

STRING F_TIPODON 2
BEGIN
   PROMPT 2 2 "Tipo donazione  "
   FLAGS "U"
   USE TDN
   INPUT CODTAB F_TIPODON
   DISPLAY "Codice" CODTAB
   DISPLAY "Descrizione@30" S0
   OUTPUT F_TIPODON CODTAB
   OUTPUT F_DESC_TIPODON S0
   VALIDATE NOT_EMPTY_FUNC
   CHECKTYPE REQUIRED
   WARNING "Codice non presente"
   HELP "Tipo donazione"
END

STRING F_LUOGODON 4
BEGIN
   PROMPT 2 3 "Luogo donazione "
   FLAGS "U"
   USE LDN
   INPUT CODTAB F_LUOGODON
   DISPLAY "Codice" CODTAB
   DISPLAY "Descrizione@30" S0
   OUTPUT F_LUOGODON CODTAB
   OUTPUT F_DESC_LUOGODON S0
   CHECKTYPE NORMAL
   WARNING "Codice non presente"
   HELP "Luogo donazione"
END

STRING F_DESC_TIPODON 25
BEGIN
  PROMPT 30 2 ""
  FLAGS "D"
END

STRING F_DESC_LUOGODON 25
BEGIN
  PROMPT 30 3 ""
  FLAGS "D"
END

BOOLEAN F_INS_CONTROLLI
BEGIN
  PROMPT 2 4 "Inserimento controlli"
END

SPREADSHEET F_SOGGETTI
BEGIN
   PROMPT 2 6 "Soggetti"
   ITEM "Codice@6"
   ITEM "Cognome@25"
   ITEM "Nome@25"
   ITEM "Con."
   ITEM "Nato il@10"
   ITEM "Sez."
   ITEM "Sot."
   ITEM "Cat."
   ITEM "Tessera"
END

ENDPAGE

ENDMASK

PAGE "Soggetto " -1 -1 78 20

GROUPBOX DLG_NULL 77 5
BEGIN
  PROMPT 1 0 ""
  FLAGS "R"
END

NUMBER F_S_CODICE 6
BEGIN
  PROMPT 2 1 "Codice         "
  FLAGS "RG"
  USE LF_SOGGETTI KEY 1
  INPUT CODICE F_S_CODICE
  DISPLAY "Codice@6" CODICE
  DISPLAY "Cognome@25" COGNOME
  DISPLAY "Nome@25" NOME
  DISPLAY "Nato il@10" DATANASC
  DISPLAY "Sez." CODSEZ
  DISPLAY "Sot." CODSOT
  DISPLAY "C." CATDON
  DISPLAY "Tessera" TESSAVIS
  OUTPUT F_S_CODICE CODICE
  OUTPUT F_S_COGNOME COGNOME
  OUTPUT F_S_NOME NOME
  OUTPUT F_S_DATANASC DATANASC
  OUTPUT F_S_CODSEZ CODSEZ
  OUTPUT F_S_CODSOT CODSOT
  OUTPUT F_S_CATDON CATDON
  OUTPUT F_S_TESSAVIS TESSAVIS
  CHECKTYPE NORMAL
  ADD RUN at0 -0
END

STRING F_S_COGNOME 25
BEGIN
  PROMPT 2 2 "Cognome e nome "
  USE LF_SOGGETTI KEY 2
  INPUT COGNOME F_S_COGNOME
  //INPUT NOME F_S_NOME
  DISPLAY "Cognome@25" COGNOME
  DISPLAY "Nome@25" NOME
  DISPLAY "Nato il@10" DATANASC
  DISPLAY "Codice@6" CODICE
  DISPLAY "Sez." CODSEZ
  DISPLAY "Sot." CODSOT
  DISPLAY "C." CATDON
  DISPLAY "Tessera" TESSAVIS
  COPY OUTPUT F_S_CODICE
  CHECKTYPE SEARCH
  HELP "Cognome del soggetto"
  ADD RUN at0 -0
END

STRING F_S_NOME 25
BEGIN
  PROMPT 46 2 ""
  USE LF_SOGGETTI KEY 2
  INPUT COGNOME F_S_COGNOME
  INPUT NOME F_S_NOME
  COPY DISPLAY F_S_COGNOME
  COPY OUTPUT F_S_COGNOME
  CHECKTYPE SEARCH
  HELP "Nome del soggetto"
  ADD RUN at0 -0
END

GROUPBOX DLG_NULL 77 9
BEGIN
  PROMPT 1 9 "Dati del controllo sanitario effettuato"
END

STRING F_S_TIPOCON 2
BEGIN
   PROMPT 2 10 "Tipo controllo "
   FLAGS "U"
   USE TCS SELECT S6=="N"
   INPUT CODTAB F_S_TIPOCON
   DISPLAY "Codice" CODTAB
   DISPLAY "Descrizione@30" S0
   OUTPUT F_S_TIPOCON CODTAB
   OUTPUT F_S_DESC_TIPOCON S0
   WARNING "Codice non presente"
   HELP "Tipo/Esito controllo sanitario"
END

DATE F_S_DATANASC
BEGIN
  PROMPT 2 3 "Nato il        "
  FLAGS "D"
END

GROUPBOX DLG_NULL 77 4
BEGIN
  PROMPT 1 5 "Dati associativi"
END

STRING F_S_CODSEZ 2
BEGIN
  PROMPT 2 6 "Sez. "
  FLAGS "D"
END

STRING F_S_DENSEZ 25
BEGIN
  PROMPT 12 6 ""
  FLAGS "D"
END

STRING F_S_CODSOT 2
BEGIN
  PROMPT 40 6 "Sot. "
  FLAGS "D"
  USE LF_SEZIONI
  INPUT CODSEZ F_S_CODSEZ
  INPUT CODSOT F_S_CODSOT
  OUTPUT F_S_DENSEZ DENSEZ
  OUTPUT F_S_DENSOT DENSOT
  CHECKTYPE NORMAL
END

STRING F_S_DENSOT 25
BEGIN        	
  PROMPT 50 6 ""
  FLAGS "D"
END

STRING F_S_CATDON 2
BEGIN
  PROMPT 2 7 "Cat. "
  FLAGS "D"
  USE CTD
  INPUT CODTAB F_S_CATDON
  OUTPUT F_S_DESC_CATDON S0
  CHECKTYPE NORMAL
END

STRING F_S_TESSAVIS 10
BEGIN
  PROMPT 52 7 "Tessera AVIS "
  FLAGS "D"
END

STRING F_S_DESC_TIPOCON 25
BEGIN
  PROMPT 23 10 ""
  FLAGS "D"
END

STRING F_S_DESC_CATDON 25
BEGIN
  PROMPT 12 7 ""
  FLAGS "D"
END

TEXT DLG_NULL
BEGIN
   PROMPT 2 11 "Se idoneita': Tipi donazione ammessi"
END

STRING F_S_IDON1 2
BEGIN
  PROMPT 40 11 ""
  FLAGS "U"
  USE IDO
  INPUT CODTAB F_S_IDON1
  DISPLAY "Codice" CODTAB
  DISPLAY "Descrizione@40" S0
  OUTPUT F_S_IDON1 CODTAB
  OUTPUT F_S_DESC_IDON1 S0
  CHECKTYPE NORMAL
  WARNING "Codice non presente"
  HELP "Idoneita' alla donazione"
END

STRING F_S_IDON2 2
BEGIN
  PROMPT 40 12 ""
  FLAGS "U"
  USE IDO
  INPUT CODTAB F_S_IDON2
  DISPLAY "Codice" CODTAB
  DISPLAY "Descrizione@40" S0
  OUTPUT F_S_IDON2 CODTAB
  OUTPUT F_S_DESC_IDON2 S0
  CHECKTYPE NORMAL
  WARNING "Codice non presente"
  HELP "Idoneita' alla donazione"
END

STRING F_S_IDON3 2
BEGIN
   PROMPT 40 13 ""
   FLAGS "U"
  USE IDO
  INPUT CODTAB F_S_IDON3
  DISPLAY "Codice" CODTAB
  DISPLAY "Descrizione@40" S0
  OUTPUT F_S_IDON3 CODTAB
  OUTPUT F_S_DESC_IDON3 S0
  CHECKTYPE NORMAL
  WARNING "Codice non presente"
  HELP "Idoneita' alla donazione"
END

STRING F_S_IDON4 2
BEGIN
   PROMPT 40 14 ""
   FLAGS "U"
  USE IDO
  INPUT CODTAB F_S_IDON4
  DISPLAY "Codice" CODTAB
  DISPLAY "Descrizione@40" S0
  OUTPUT F_S_IDON4 CODTAB
  OUTPUT F_S_DESC_IDON4 S0
  CHECKTYPE NORMAL
  WARNING "Codice non presente"
  HELP "Idoneita' alla donazione"
END

TEXT DLG_NULL
BEGIN
   PROMPT 2 15 "                          Intervalli"
END

NUMBER F_S_INTSI 3 0
BEGIN
   PROMPT 40 15 "Sangue intero "
   FLAGS "U"
END

NUMBER F_S_INTAF 3 0
BEGIN
   PROMPT 60 15 "Aferesi "
   FLAGS "U"
END

STRING F_S_PROSSTIPO 2
BEGIN
   PROMPT 2 16 "Prossimo contr.: Tipo "
   FLAGS "U"
   USE TCS
   INPUT CODTAB F_S_PROSSTIPO
   DISPLAY "Codice" CODTAB
   DISPLAY "Descrizione@40" S0
   OUTPUT F_S_PROSSTIPO CODTAB
   OUTPUT F_S_DESC_PROSSTIPO S0
   CHECKTYPE NORMAL
   WARNING "Codice non presente"
   HELP "Tipo/Esito controllo sanitario"
END


DATE F_S_PROSSDATA
BEGIN
   PROMPT 56 16 "Data "
   HELP "Data controllo"
END

STRING F_S_DESC_IDON1 25
BEGIN
  PROMPT 46 11 ""
  FLAGS "D"
END

STRING F_S_DESC_IDON2 25
BEGIN
  PROMPT 46 12 ""
  FLAGS "D"
END

STRING F_S_DESC_IDON3 25
BEGIN
  PROMPT 46 13 ""
  FLAGS "D"
END

STRING F_S_DESC_IDON4 25
BEGIN
  PROMPT 46 14 ""
  FLAGS "D"
END

STRING F_S_DESC_PROSSTIPO 25
BEGIN
  PROMPT 29 16 ""
  FLAGS "D"
END

BUTTON DLG_OK 9 2
BEGIN
   PROMPT -13 -1 ""
END

BUTTON DLG_CANCEL 9 2
BEGIN
   PROMPT -23 -1 ""
END

BUTTON DLG_DELREC 9 2
BEGIN
   PROMPT -33 -1 ""
   MESSAGE EXIT, K_DEL
END

ENDPAGE

ENDMASK
