home *** CD-ROM | disk | FTP | other *** search
- /****************************************************************************\
- * *
- * People.jfm -- Contact Manager Data Entry Form *
- * *
- * People.jfm is part of the Contact Manager solution application. It is one *
- * of two data entry forms the user encounters. In this form, the user can *
- * add, delete, and modify people (or customers/clients). They can record *
- * information about this persons address, and phone number. *
- * *
- * Dependencies: bkgnd.gif *
- * people-t.gif *
- * logo.gif *
- * barsep.gif *
- * recnav.gif *
- * homenav.gif *
- * *
- * Links to: ibapps/contacts/index.htm *
- * *
- * Copyright (c) 1996, Borland International, Inc. All rights reserved. *
- * *
- \****************************************************************************/
- // {End Header} Do not remove this comment//
- // Generated on 11/12/96
- //
- var f = new peopleForm();
- f.open();
- class peopleForm extends Form {
- with (this) {
- height = 13;
- left = 0;
- top = 0;
- width = 72;
- title = "Form";
- background = "filename bkgnd.gif";
- }
-
-
- with (this.contactdb = new Database()){
- left = 52;
- top = 3;
- databaseName = "CONTACTS";
- active = true;
- }
-
-
- with (this.people1 = new Query()){
- left = 46;
- top = 3;
- database = parent.contactdb;
- sql = "SELECT * FROM People";
-
- active = true;
- }
-
-
- with (this.people1.rowset) {
-
- }
-
-
- with (this.firstnameLabel = new HTML(this)){
- height = 1;
- top = 8;
- width = 16;
- color = "blue";
- text = "First Name";
- }
-
-
- with (this.FirstName = new Text(this)){
- top = 9;
- width = 16;
- dataLink = parent.people1.rowset.fields["FNAME"];
- }
-
-
- with (this.lastnameLabel = new HTML(this)){
- height = 1;
- left = 18;
- top = 8;
- width = 18;
- color = "blue";
- text = "Last Name";
- }
-
-
- with (this.LastName = new Text(this)){
- left = 18;
- top = 9;
- width = 18;
- dataLink = parent.people1.rowset.fields["LNAME"];
- }
-
-
- with (this.addressLabel = new HTML(this)){
- height = 1;
- top = 10;
- width = 42;
- color = "blue";
- text = "Address";
- }
-
-
- with (this.Address1 = new Text(this)){
- top = 11;
- width = 36;
- dataLink = parent.people1.rowset.fields["ADDRESS"];
- }
-
-
- with (this.cityLabel = new HTML(this)){
- height = 1;
- top = 12;
- width = 16;
- color = "blue";
- text = "City";
- }
-
-
- with (this.City = new Text(this)){
- top = 13;
- width = 16;
- dataLink = parent.people1.rowset.fields["CITY"];
- }
-
-
- with (this.stateLabel = new HTML(this)){
- height = 1;
- left = 18;
- top = 12;
- width = 6;
- color = "blue";
- text = "State";
- }
-
-
- with (this.State = new Text(this)){
- left = 18;
- top = 13;
- width = 6;
- dataLink = parent.people1.rowset.fields["STATE"];
- }
-
-
- with (this.zipcodeLabel = new HTML(this)){
- height = 1;
- left = 26;
- top = 12;
- width = 10;
- color = "blue";
- text = "Zip Code";
- }
-
-
- with (this.ZipCode = new Text(this)){
- left = 26;
- top = 13;
- width = 10;
- dataLink = parent.people1.rowset.fields["ZIP"];
- }
-
-
- with (this.phoneLabel = new HTML(this)){
- height = 1;
- top = 14;
- width = 18.5;
- color = "blue";
- text = "Phone Number";
- }
-
-
- with (this.Phone = new Text(this)){
- top = 15;
- width = 18;
- dataLink = parent.people1.rowset.fields["PHONE"];
- }
-
-
- with (this.custlogImage = new Image(this)){
- height = 1.9167;
- top = 5;
- width = 18.25;
- dataSource = "filename CUSTLOG.GIF";
- alignment = 4;
- }
-
-
- with (this.barsepImage1 = new Image(this)){
- height = 0.4167;
- top = 7;
- width = 62.5;
- dataSource = "filename BARSEP.GIF";
- alignment = 4;
- }
-
-
- with (this.barsepImage2 = new Image(this)){
- height = 0.4167;
- top = 17;
- width = 62.5;
- dataSource = "filename BARSEP.GIF";
- alignment = 4;
- }
-
-
- with (this.NavBar = new Image(this)){
- onImageServerClick = class::NavBar_onImageServerClick;
- height = 1.0417;
- top = 18;
- width = 23.5;
- dataSource = "filename RECNAV.GIF";
- alignment = 4;
- }
-
-
- with (this.NavHome = new Image(this)){
- onImageClick = class::NavHome_onImageClick;
- height = 1.0833;
- left = 59.25;
- top = 5.8333;
- width = 3.25;
- dataSource = "filename HOMENAV.GIF";
- alignment = 4;
- }
-
-
- with (this.logoImage = new Image(this)){
- height = 5;
- width = 62.625;
- dataSource = "filename LOGO.GIF";
- alignment = 4;
- }
-
- this.rowset = this.people1.rowset;
-
- function NavBar_onImageServerClick(nLeft, nTop)
- {
- if (nLeft >= 0 && nLeft <= 25)
- {
- // The user clicked "First"
- form.rowset.first();
- }
- else if (nLeft >= 27 && nLeft <= 52)
- {
- // The user clicked "Previous"
- if (!form.rowset.next(-1))
- form.rowset.next();
- }
- else if (nLeft >= 54 && nLeft <= 79)
- {
- // The user clicked "Next"
- if (!form.rowset.next())
- {
- form.rowset.next(-1);
- form.rowset.beginAppend();
- }
- }
- else if (nLeft >= 81 && nLeft <= 106)
- {
- // The user clicked "Last"
- form.rowset.last();
- }
- else if (nLeft >= 108 && nLeft <= 133)
- {
- // The user clicked "Add"
- form.rowset.beginAppend();
- }
- else if (nLeft >= 135 && nLeft <= 160)
- {
- // The user clicked "Save" (the floppy disk image)
- var state = form.rowset.state;
- form.rowset.save();
- if (state == 3) { // Append
- form.rowset.parent.requery();
- form.rowset.last();
- }
- }
- else if (nLeft >= 162 && nLeft <= 188)
- {
- // The user clicked "Delete" (the big red X image)
- form.rowset.delete();
- }
- }
-
- function NavHome_onImageClick()
- {
- location.href = "/ibapps/contacts/index.htm";
- }
-
- }
-