Module IMPDELC.VW

     1
     2Use allentry.pkg
     3Use BatchDD.pkg
     4Use StatLog.pkg
     5Use CustImp.pkg
     6Use CustDel.pkg
     7
     8/Import_Delete_Customer_image
     9┌─Import and Delete Customers──────────────────────────────────────────┐
    10│                                                                      │
    11│ This demonstrates how a BPO can be used to import and delete records │
    12│                                                                      │
    13│ Import Customers                                                     │
    14│         This will import customers from a file named Cust.txt which  │
    15│         should be placed in your data directory                      │
    16│                                                                      │
    17│                                                                      │
    18│                                                                      │
    19│ Delete Customers                                                     │
    20│         This will delete the customers you just imported. It looks   │
    21│         customers with the text "NEW:" prefaced to the name and      │
    22│         deletes them.                                                │
    23│                                                                      │
    24│                                                                      │
    25│                                                                      │
    26└──────────────────────────────────────────────────────────────────────┘
    27/Import_Button_Image
    28__________________
    29/Delete_Button_Image
    30__________________
    31/ID_Close_Button_Image
    32________
    33/*
    34
    35Activate_View Activate_Import_Delete_Customers for Import_Delete_Customers
    36
    37object Import_Delete_Customers IS a View_Client Import_delete_Customer_Image
    38  send Locate_In_Center_Of_Screen
    39  Set Value to "Import Delete Customers"
    40  Set Center_State item 1 to True
    41  Set allow_move_state to true
    42
    43  On_key kCancel Send Close_Panel
    44
    45  Object Import_button IS A BUTTON Import_button_image
    46    Set Location to 8 9 relative
    47    Item_list
    48       On_item "" Send ImportCustomers
    49    End_item_list
    50  End_object
    51
    52  Object Delete_button IS A BUTTON Delete_button_image
    53    Set Location to 15 9 relative
    54    Item_list
    55       On_item "" Send DeleteCustomers
    56    End_item_list
    57  End_object
    58
    59  Object Cancel_button IS A BUTTON ID_Close_button_image
    60    Set Location to 16 60 relative
    61    Item_list
    62       On_item "" Send Close_Panel
    63    End_item_list
    64  End_object
    65
    66  Procedure close_panel
    67    send deactivate
    68  End_Procedure
    69
    70
    71    Procedure ImportCustomers
    72        Send DoImport to CustImporter "cust.txt"
    73    End_Procedure
    74
    75    Procedure DeleteCustomers
    76        Send DoProcess to CustDeleter
    77    End_Procedure
    78
    79End_object
    80