home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1997 May / Pcwk0597.iso / borland / ib / setups / intrabld / data.z / EMPLOYEE.JFM < prev    next >
Text File  |  1996-12-11  |  6KB  |  206 lines

  1. /****************************************************************************\
  2. *                                                                            *
  3. * Employee.jfm  --  Employee Phone Book Details Form                         *
  4. *                                                                            *
  5. * Employee.jfm is part of the Phone Book solution application. It is used    *
  6. * view the details about a single employee. The form is called by the        *
  7. * phoneemp or phonedep report. If a single parameter is passed to this form  *
  8. * it will show the details for the employee whose EmployeeID matches the     *
  9. * parameter.                                                                 *
  10. *                                                                            *
  11. * Dependencies:  phonbk31.gif                                                *
  12. *                apps\shared\controls.cc                                     *
  13. *                                                                            *
  14. * Links to:      ibapps/index.htm                                            *
  15. *                svr/intrasrv.isv?apps/phone/phonedep.jrp                    *
  16. *                svr/intrasrv.isv?apps/phone/phoneemp.jrp                    *
  17. *                svr/intrasrv.isv?apps/phone/update.jfm                      *
  18. *                                                                            *
  19. * Updated 11/12/96 by IntraBuilder Samples Group                             *
  20. * $Revision:   1.29  $                                                       *
  21. *                                                                            *
  22. * Copyright (c) 1996, Borland International, Inc. All rights reserved.       *
  23. *                                                                            *
  24. \****************************************************************************/
  25. //
  26. // This header code is executed when the form is run. The return
  27. // prevents the designer generated startup code from executing.
  28. // 
  29. // If a parameter is passed to the form, the rowset will be 
  30. // advanced to the record whose empid matches the parameter.
  31. // 
  32. var f = new employeeForm();
  33. if (EMPLOYEE.arguments.length == 1) {
  34.    f.rowset.applyLocate('"Employee ID"=' + EMPLOYEE.arguments[0]);
  35. }
  36. f.open();
  37. return;
  38. // {End Header} Do not remove this comment//
  39. // Generated on 11/12/96
  40. //
  41. var f = new employeeForm();
  42. f.open();
  43. class employeeForm extends Form {
  44.    _sys.scripts.load(_sys.env.home() + "APPS\\SHARED\\CONTROLS.CC")
  45.    with (this) {
  46.       color = "cae4ff";
  47.       height = 15;
  48.       left = 0;
  49.       top = 0;
  50.       width = 78;
  51.       title = "Employee Details";
  52.    }
  53.  
  54.  
  55.    with (this.ibapps1 = new Database()){
  56.       left = 20;
  57.       top = 2;
  58.       databaseName = "IBAPPS";
  59.       active = true;
  60.  
  61.    }
  62.  
  63.    with (this.employee1 = new Query()){
  64.       left = 26;
  65.       top = 2;
  66.       database = parent.ibapps1;
  67.       sql = "SELECT * FROM employee";
  68.  
  69.       active = true;
  70.  
  71.       with (rowset) {
  72.  
  73.  
  74.       }
  75.  
  76.    }
  77.  
  78.    with (this.department1 = new Query()){
  79.       left = 32;
  80.       top = 2;
  81.       database = parent.ibapps1;
  82.       sql = "select * from departmt";
  83.  
  84.       active = true;
  85.  
  86.       with (rowset) {
  87.  
  88.          masterRowset = parent.parent.employee1.rowset;
  89.          masterFields = "Department";
  90.  
  91.       }
  92.  
  93.    }
  94.  
  95.    with (this.rule1 = new Rule(this)){
  96.       top = 13.5;
  97.       size = 2;
  98.       right = 70;
  99.  
  100.    }
  101.  
  102.    with (this.PhoneBookLogo = new Image(this)){
  103.       height = 3.4167;
  104.       width = 10.25;
  105.       dataSource = "filename PHONBK31.GIF";
  106.       alignment = 4;
  107.  
  108.    }
  109.  
  110.    with (this.FullnameHTML = new HTML(this)){
  111.       height = 2;
  112.       left = 12;
  113.       width = 58;
  114.       color = "853a1a";
  115.       text = {||"<H1>" + form.employee1.rowset.fields["Full Name"].value + "</H1>"};
  116.  
  117.    }
  118.  
  119.    with (this.EmployeeImage = new Image(this)){
  120.       height = 7.2917;
  121.       top = 4;
  122.       width = 18.75;
  123.       dataSource = parent.employee1.rowset.fields["Picture"];
  124.       alignment = 4;
  125.  
  126.    }
  127.  
  128.    with (this.DepartmentHTML = new HTML(this)){
  129.       height = 0.75;
  130.       left = 20;
  131.       top = 4.75;
  132.       width = 46;
  133.       color = "black";
  134.       text = {||form.department1.rowset.fields["Department"].value};
  135.  
  136.    }
  137.  
  138.    with (this.TitleHTML = new HTML(this)){
  139.       height = 0.75;
  140.       left = 20;
  141.       top = 4;
  142.       width = 46;
  143.       color = "black";
  144.       text = {||form.employee1.rowset.fields["Title"].value};
  145.  
  146.    }
  147.  
  148.    with (this.PhoneHTML = new HTML(this)){
  149.       height = 0.75;
  150.       left = 20;
  151.       top = 5.5;
  152.       width = 46;
  153.       color = "black";
  154.       text = {||"Extension: x" + form.employee1.rowset.fields["Phone"].value};
  155.  
  156.    }
  157.  
  158.    with (this.LocationHTML = new HTML(this)){
  159.       height = 0.75;
  160.       left = 20;
  161.       top = 6.25;
  162.       width = 46;
  163.       color = "black";
  164.       text = {||"Office: " + form.employee1.rowset.fields["Location"].value};
  165.  
  166.    }
  167.  
  168.    with (this.homepageHTML = new HTML(this)){
  169.       height = 2;
  170.       left = 20;
  171.       top = 7;
  172.       width = 46;
  173.       color = "black";
  174.       text = {||"<A HREF='" + this.form.employee1.rowset.fields["Homepage"].value + "'>" + this.form.employee1.rowset.fields["Homepage"].value + "</A>"};
  175.  
  176.    }
  177.  
  178.    with (this.PhoneNoteHTML = new HTML(this)){
  179.       height = 2;
  180.       left = 20;
  181.       top = 9;
  182.       width = 46;
  183.       color = "black";
  184.       text = {||form.employee1.rowset.fields["Phone Note"].value};
  185.  
  186.    }
  187.  
  188.    with (this.LinksHTML = new HTML(this)){
  189.       height = 1;
  190.       top = 12;
  191.       width = 70;
  192.       color = "black";
  193.       text = {||'<A HREF="/ibapps/index.htm">[Home]</A> <A HREF="/svr/intrasrv.isv?apps/phone/phoneemp.jrp">[List by Employee]</A> <A HREF="/svr/intrasrv.isv?apps/phone/phonedep.jrp">[List by Department]</A> <A HREF="/svr/intrasrv.isv?apps/phone/update.jfm(' + parseInt(this.form.employee1.rowset.fields["Employee ID"].value) + ')">[Update Data]</A>'};
  194.  
  195.    }
  196.  
  197.    with (this.GeneratedHTML1 = new GeneratedHTML(this)){
  198.       height = 1;
  199.       top = 14;
  200.       width = 70;
  201.  
  202.    }
  203.    this.rowset = this.employee1.rowset;
  204.  
  205. }
  206.