Module Sysfile1.DD

     1//DDB-FileStart
     2//DDB-HeaderStart
     3
     4// File Name : Sysfile1.DD
     5// Class Name: Sysfile1_DataDictionary
     6// Revision  : 5
     7// Version   : 2
     8
     9Use  Windows           // Basic Definitions
    10Use  DataDict.pkg          // DataDictionary Class Definition
    11Use  DDvalTbl          // Validation Table Class Definitions
    12
    13Open Sysfile1
    14
    15//DDB-HeaderEnd
    16//DDB-ValidationStart
    17
    18Register_Object Sysfile1_Country_VT
    19
    20Object Sysfile1_Country_VT  is a DescriptionValidationTable
    21
    22    Procedure Fill_List
    23        Forward Send Fill_List
    24        Send Add_Table_Value  "DK"  "Denmark"
    25        Send Add_Table_Value  "NL"  "Netherlands"
    26        Send Add_Table_Value  "GB"  "United Kingdom"
    27        Send Add_Table_Value  "US"  "U.S.A."
    28        Send Add_Table_Value  "HR"  "Croatia"
    29    End_Procedure    // Fill_List
    30    //DDB-ValidationCustomStart
    31    //DDB-ValidationCustomEnd
    32End_Object   // Sysfile1_Country_VT
    33//DDB-ValidationEnd
    34
    35Class Sysfile1_DataDictionary  is a DataDictionary
    36
    37    // Define_Fields:
    38    // This procedure is used to set up all data-dictionary rules.
    39
    40    Procedure Define_Fields
    41        Forward Send Define_Fields
    42        //DDB-Generated-Code-Location
    43        //DDB-DefineFieldStart
    44
    45        Set Main_File            To Sysfile1.File_Number
    46
    47        Set Foreign_Field_Options  DD_KEYFIELD   To DD_AUTOFIND    DD_NOPUT       DD_FINDREQ    
    48        Set Foreign_Field_Options  DD_INDEXFIELD To DD_NOPUT       DD_FINDREQ    
    49        Set Foreign_Field_Options  DD_DEFAULT    To DD_DISPLAYONLY
    50        Set Validate_Delete_Structure_Mode       To DD_VALIDATE_STRUCTURE_ALWAYS
    51        Set Validate_Save_Structure_Mode         To DD_VALIDATE_STRUCTURE_ALWAYS
    52
    53        // Field-based properties.......................
    54
    55        // Sysfile1.Organisation
    56        Set Field_Label_Long       Field Sysfile1.Organisation to "Name"
    57        Set Status_Help            Field Sysfile1.Organisation to "Company Name"
    58
    59        // Sysfile1.Address1
    60        Set Field_Label_Long       Field Sysfile1.Address1 to "Address Line 1"
    61        Set Status_Help            Field Sysfile1.Address1 to "Address details"
    62        
    63        // Sysfile1.Address2
    64        Set Field_Label_Long       Field Sysfile1.Address2 to "Address Line 2"
    65        Set Status_Help            Field Sysfile1.Address2 to "Address details"
    66        
    67        // Sysfile1.Address3
    68        Set Field_Label_Long       Field Sysfile1.Address3 to "Address Line 3"
    69        Set Status_Help            Field Sysfile1.Address3 to "Address details"
    70        
    71        // Sysfile1.Address4
    72        Set Field_Label_Long       Field Sysfile1.Address4 to "Address Line 4"
    73        Set Status_Help            Field Sysfile1.Address4 to "Address details"
    74        
    75        // Sysfile1.Postcode
    76        Set Field_Label_Long       Field Sysfile1.Postcode To "Postcode"
    77        Set Field_Options          Field Sysfile1.Postcode To DD_CAPSLOCK   
    78
    79        // Sysfile1.Telephone_No
    80        Set Field_Label_Long       Field Sysfile1.Telephone_No to "Main Telephone"
    81        Set Status_Help            Field Sysfile1.Telephone_No to "Main telephone number"
    82
    83        // Sysfile1.System_Date
    84        Set Field_Label_Long       Field Sysfile1.System_Date To "System Date"
    85
    86        // Sysfile1.Country
    87        Set Field_Label_Long       Field Sysfile1.Country To "Country"
    88        Set Field_Options          Field Sysfile1.Country To DD_CAPSLOCK   
    89        Set Field_Value_Table      Field Sysfile1.Country To (Sysfile1_Country_VT(Self))
    90
    91        // Sysfile1.Amend_Date
    92        Set Field_Checkbox_Values  Field Sysfile1.Amend_Date To "Y"  "N"
    93        Set Field_Options          Field Sysfile1.Amend_Date To DD_CAPSLOCK   
    94
    95        // Sysfile1.Counter1
    96
    97        // Sysfile1.Counter2
    98
    99        // Sysfile1.Default_Price
   100
   101        //DDB-DefineFieldEnd
   102    End_Procedure    // Define_Fields
   103
   104    // Field_Defaults:
   105    // This procedure is used to establish default field values.
   106
   107    Procedure Field_Defaults
   108        Forward Send Field_Defaults
   109        //DDB-Generated-Code-Location
   110        //DDB-FieldDefaultStart
   111        Set Field_Changed_Value   Field Sysfile1.Amend_Date To "N"
   112        //DDB-FieldDefaultEnd
   113    End_Procedure    // Field_Defaults
   114
   115End_Class    // Sysfile1_DataDictionary
   116//DDB-FileEnd
   117