home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 8 / CDACTUAL8.iso / progs / ite / ite10d1.exe / DATA.Z / PEOPLE.JFM < prev    next >
Encoding:
Text File  |  1996-09-07  |  7.7 KB  |  321 lines

  1. /****************************************************************************\
  2. *                                                                            *
  3. * People.jfm  --  Contact Manager Data Entry Form                            *
  4. *                                                                            *
  5. * People.jfm is part of the Contact Manager solution application.  It is one *
  6. * of two data entry forms the user encounters.  In this form, the user can   *
  7. * add, delete, and modify people (or customers/clients).  They can record    *
  8. * information about this persons address, and phone number.                  *
  9. *                                                                            *
  10. * Dependencies:  bkgnd.gif                                                   *
  11. *                people-t.gif                                                *
  12. *                logo.gif                                                    *
  13. *                barsep.gif                                                  *
  14. *                recnav.gif                                                  *
  15. *                homenav.gif                                                 *
  16. *                                                                            *
  17. * Links to:      ibapps/contacts/index.htm                                   *
  18. *                                                                            *
  19. * Copyright (c) 1996, Borland International, Inc. All rights reserved.       *
  20. *                                                                            *
  21. \****************************************************************************/
  22. // {End Header} Do not remove this comment//
  23. // Generated on 09/03/96
  24. //
  25. var f = new peopleForm();
  26. f.open();
  27. class peopleForm extends Form {
  28.    with (this) {
  29.       height = 27;
  30.       left = 10.1667;
  31.       top = 0;
  32.       width = 90;
  33.       title = "Form";
  34.       background = "filename bkgnd.gif";
  35.       onServerLoad = class::Form_onServerLoad;
  36.       onDesignLoad = class::Form_onDesignLoad;
  37.    }
  38.  
  39.  
  40.    with (this.contactdb = new Database()){
  41.       left = 8;
  42.       top = 23;
  43.       databaseName = "CONTACTS";
  44.       active = true;
  45.    }
  46.  
  47.  
  48.    with (this.people1 = new Query()){
  49.       left = 2;
  50.       top = 23;
  51.       database = parent.contactdb;
  52.       sql = "SELECT * FROM People";
  53.       active = true;
  54.    }
  55.  
  56.  
  57.    with (this.people1.rowset) {
  58.    }
  59.  
  60.  
  61.    with (this.firstnameLabel = new HTML(this)){
  62.       height = 1;
  63.       left = 1;
  64.       top = 11;
  65.       width = 23;
  66.       color = "blue";
  67.       fontBold = false;
  68.       text = "First Name";
  69.    }
  70.  
  71.  
  72.    with (this.FirstName = new Text(this)){
  73.       left = 1;
  74.       top = 12;
  75.       width = 23;
  76.       dataLink = parent.people1.rowset.fields["FNAME"];
  77.    }
  78.  
  79.  
  80.    with (this.lastnameLabel = new HTML(this)){
  81.       height = 1;
  82.       left = 28;
  83.       top = 11;
  84.       width = 18;
  85.       color = "blue";
  86.       fontBold = false;
  87.       text = "Last Name";
  88.    }
  89.  
  90.  
  91.    with (this.LastName = new Text(this)){
  92.       left = 28;
  93.       top = 12;
  94.       width = 18;
  95.       dataLink = parent.people1.rowset.fields["LNAME"];
  96.    }
  97.  
  98.  
  99.    with (this.addressLabel = new HTML(this)){
  100.       height = 1;
  101.       left = 1;
  102.       top = 13;
  103.       width = 33;
  104.       color = "blue";
  105.       fontBold = false;
  106.       text = "Address";
  107.    }
  108.  
  109.  
  110.    with (this.Address1 = new Text(this)){
  111.       left = 1;
  112.       top = 14;
  113.       width = 45;
  114.       dataLink = parent.people1.rowset.fields["ADDRESS"];
  115.    }
  116.  
  117.  
  118.    with (this.cityLabel = new HTML(this)){
  119.       height = 1;
  120.       left = 1;
  121.       top = 15;
  122.       width = 23;
  123.       color = "blue";
  124.       fontBold = false;
  125.       text = "City";
  126.    }
  127.  
  128.  
  129.    with (this.City = new Text(this)){
  130.       left = 1;
  131.       top = 16;
  132.       width = 23;
  133.       dataLink = parent.people1.rowset.fields["CITY"];
  134.    }
  135.  
  136.  
  137.    with (this.stateLabel = new HTML(this)){
  138.       height = 1;
  139.       left = 28;
  140.       top = 15;
  141.       width = 8;
  142.       color = "blue";
  143.       fontBold = false;
  144.       text = "State";
  145.    }
  146.  
  147.  
  148.    with (this.State = new Text(this)){
  149.       left = 28;
  150.       top = 16;
  151.       width = 8;
  152.       dataLink = parent.people1.rowset.fields["STATE"];
  153.    }
  154.  
  155.  
  156.    with (this.zipcodeLabel = new HTML(this)){
  157.       height = 1;
  158.       left = 43;
  159.       top = 15;
  160.       width = 13;
  161.       color = "blue";
  162.       fontBold = false;
  163.       text = "Zip Code";
  164.    }
  165.  
  166.  
  167.    with (this.ZipCode = new Text(this)){
  168.       left = 43;
  169.       top = 16;
  170.       width = 13;
  171.       dataLink = parent.people1.rowset.fields["ZIP"];
  172.    }
  173.  
  174.  
  175.    with (this.phoneLabel = new HTML(this)){
  176.       height = 1;
  177.       left = 1;
  178.       top = 17;
  179.       width = 18.5;
  180.       color = "blue";
  181.       fontBold = false;
  182.       text = "Phone Number";
  183.    }
  184.  
  185.  
  186.    with (this.Phone = new Text(this)){
  187.       left = 1;
  188.       top = 18;
  189.       width = 18.5;
  190.       dataLink = parent.people1.rowset.fields["PHONE"];
  191.    }
  192.  
  193.  
  194.    with (this.custlogImage = new Image(this)){
  195.       height = 2.7059;
  196.       left = 1;
  197.       top = 7;
  198.       width = 24.3333;
  199.       dataSource = "filename CUSTLOG.GIF";
  200.       alignment = 4;
  201.    }
  202.  
  203.  
  204.    with (this.barsepImage1 = new Image(this)){
  205.       height = 0.5882;
  206.       left = 1;
  207.       top = 10;
  208.       width = 83.3333;
  209.       dataSource = "filename BARSEP.GIF";
  210.       alignment = 4;
  211.    }
  212.  
  213.  
  214.    with (this.barsepImage2 = new Image(this)){
  215.       height = 0.5882;
  216.       left = 1;
  217.       top = 20;
  218.       width = 83.3333;
  219.       dataSource = "filename BARSEP.GIF";
  220.       alignment = 4;
  221.    }
  222.  
  223.  
  224.    with (this.NavBar = new Image(this)){
  225.       height = 1.4706;
  226.       left = 1;
  227.       top = 21;
  228.       width = 31.3333;
  229.       dataSource = "filename RECNAV.GIF";
  230.       alignment = 4;
  231.       onImageServerClick = class::NavBar_onImageServerClick;
  232.    }
  233.  
  234.  
  235.    with (this.NavHome = new Image(this)){
  236.       height = 1.5294;
  237.       left = 43;
  238.       top = 7;
  239.       width = 4.3333;
  240.       dataSource = "filename HOMENAV.GIF";
  241.       alignment = 4;
  242.       onImageClick = class::NavHome_onImageClick;
  243.    }
  244.  
  245.  
  246.    with (this.logoImage = new Image(this)){
  247.       height = 7.0588;
  248.       left = 1;
  249.       width = 83.5;
  250.       dataSource = "filename LOGO.GIF";
  251.       alignment = 4;
  252.    }
  253.  
  254.    this.rowset = this.people1.rowset;
  255.  
  256.    function NavBar_onImageServerClick(nLeft, nTop)
  257.    {
  258.      if (nLeft >= 0 && nLeft <= 25)
  259.      {
  260.        // The user clicked "First"
  261.        form.rowset.first();
  262.      }
  263.      else if (nLeft >= 27 && nLeft <= 52)
  264.      {
  265.        // The user clicked "Previous"
  266.        if (!form.rowset.next(-1))
  267.          form.rowset.next();
  268.      }
  269.      else if (nLeft >= 54 && nLeft <= 79)
  270.      {
  271.        // The user clicked "Next"
  272.        if (!form.rowset.next())
  273.        {
  274.          form.rowset.next(-1);
  275.          form.rowset.beginAppend();
  276.        }
  277.      }
  278.      else if (nLeft >= 81 && nLeft <= 106)
  279.      {
  280.        // The user clicked "Last"
  281.        form.rowset.last();
  282.      }
  283.      else if (nLeft >= 108 && nLeft <= 133)
  284.      {
  285.        // The user clicked "Add"
  286.        form.rowset.beginAppend();
  287.      }
  288.      else if (nLeft >= 135 && nLeft <= 160)
  289.      {
  290.        // The user clicked "Save" (the floppy disk image)
  291.        form.rowset.save();
  292.      }
  293.      else if (nLeft >= 162 && nLeft <= 188)
  294.      {
  295.        // The user clicked "Delete" (the big red X image)
  296.        form.rowset.delete();
  297.      }
  298.    }
  299.  
  300.    function NavHome_onImageClick()
  301.    {
  302.      location.href = "/ibapps/contacts/index.htm";
  303.    }
  304.  
  305.    function Form_onDesignLoad()
  306.    {
  307.      // Set the form's width and height properties
  308.      // for designing the form
  309.      this.height = 27;
  310.      this.width = 90;
  311.    }
  312.  
  313.    function Form_onServerLoad()
  314.    {
  315.      // Set the form's width and height properties
  316.      this.height = 23;
  317.      this.width = 86;
  318.    }
  319.  
  320. }
  321.