home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 5 / 05.iso / a / a012 / 1.ddi / CHAP16.EXE / CHP1606.PRG < prev    next >
Encoding:
Text File  |  1991-04-30  |  901 b   |  39 lines

  1. /*
  2.    Listing 16.6  Lunch time lock
  3.    Author: Joe Booth
  4.    Excerpted from "Clipper 5: A Developer's Guide"
  5.    Copyright (c) 1991 M&T Books
  6.                       501 Galveston Drive
  7.                       Redwood City, CA 94063-4728
  8.                       (415) 366-3600
  9. */
  10.  
  11.  
  12. #include "INKEY.CH"
  13.  
  14. function upd_cust(cId_code)
  15. LOCAL mname, mcontact
  16. MEMVAR getlist
  17. use CUSTOMER shared new
  18. if ! neterr()
  19.    set index to cust1, cust2
  20. endif
  21. seek cId_code
  22. if found()
  23.    if rec_lock()
  24.       mname    := CUSTOMER->company
  25.       mcontact := CUSTOMER->contact
  26.       @ 10,10 say "Company name...: " get mname
  27.       @ 11,10 say "Billing contact: " get mcontact
  28.       read
  29.       if lastkey() <> K_ESC
  30.           replace CUSTOMER->company with mname,;
  31.                   CUSTOMER->contact with mcontact
  32.       endif
  33.       unlock
  34.    endif
  35. endif
  36. return nil
  37.  
  38. // end of file CHP1606.PRG
  39.