Advertisement
Guest User

Untitled

a guest
May 30th, 2015
252
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.81 KB | None | 0 0
  1.  
  2. Documentation()
  3.  
  4. OnRun()
  5. fct_Create_locations();
  6.  
  7. fct_Create_locations()
  8. recKdgLocation.RESET;
  9. recKdgSetup.RESET;
  10. IF recKdgLocation.FINDFIRST THEN
  11. recKdgLocation.DELETEALL;
  12. recKdgSetup.SETFILTER(recKdgSetup."No.",'=1');
  13. recKdgSetup.INIT;
  14. recKdgSetup.FINDFIRST;
  15. WHILE recKdgSetup."Location Start" <> recKdgSetup."Location End" DO
  16. BEGIN
  17. recKdgLocation.INIT;
  18. recKdgLocation.Code := recKdgSetup."Location Start";
  19. recKdgSetup."Location Start" := INCSTR(recKdgSetup."Location Start");
  20. recKdgLocation.Description := 'Location ' + recKdgLocation.Code;
  21. recKdgLocation."Default Item" := recKdgSetup."Loc Default Item";
  22. recKdgLocation."Default Customer" := recKdgSetup."Loc Default Customer";
  23. recKdgLocation."Total Width (cm)" := recKdgSetup."Loc Default Width (cm)";
  24. recKdgLocation."Total Height (cm)" := recKdgSetup."Loc Default Height (cm)";
  25. recKdgLocation."Total Depth (cm)" := recKdgSetup."Loc Default Depth (cm)";
  26. recKdgLocation.INSERT(TRUE);
  27. END;
  28. MESSAGE('%1 rows inserted.', recKdgLocation.COUNT);
  29.  
  30. fct_Demo_StrMenu()
  31. lintResponse := STRMENU('Red,Yellow,Stripes,Green,Blue,I do not know',6,
  32. 'Which of these is not like the others?');
  33. CASE lintResponse OF
  34. 1..2,4..5: MESSAGE('Wrong!');
  35. 3: MESSAGE('True!');
  36. 6: MESSAGE('How sad :(');
  37. END;
  38.  
  39. fct_Demo_Date2DMY()
  40. ldatStartDate := 210312D;
  41. lintDD := DATE2DMY(ldatStartDate, 1);
  42. lintMM := DATE2DMY(ldatStartDate, 2);
  43. lintYY := DATE2DMY(ldatStartDate, 3);
  44. MESSAGE('%1', lintMM);
  45.  
  46. fct_Show_NoContact()
  47. recCustomer.RESET;
  48. recCustomer.SETFILTER(recCustomer.Contact,'=%1','');
  49. recCustomer.SETFILTER(recCustomer."No.",'6*');
  50. MESSAGE('Amount is %1',recCustomer.COUNT);
  51.  
  52. fct_Show_CustomerName()
  53. recCustomer.RESET;
  54. recCustomer.SETFILTER(recCustomer.Contact,'=%1','Jenny Lysaker');
  55. IF recCustomer.FINDFIRST THEN
  56. MESSAGE('%1\%2',recCustomer."No.",recCustomer.Name);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement