home *** CD-ROM | disk | FTP | other *** search
/ CD Actual Thematic 7: Programming / CDAT7.iso / Share / Java / JDesignerPro / Jdp3_0.exe / data1.cab / Program_Files / AuthorInquiry.class (.txt) < prev    next >
Encoding:
Java Class File  |  1999-04-09  |  13.5 KB  |  525 lines

  1. import java.awt.BorderLayout;
  2. import java.awt.Container;
  3. import java.awt.Event;
  4. import java.awt.Font;
  5. import java.awt.Label;
  6. import java.awt.Panel;
  7. import java.awt.TextField;
  8. import java.util.StringTokenizer;
  9. import java.util.Vector;
  10.  
  11. public class AuthorInquiry extends JDPClassLayout {
  12.    JDPUser user;
  13.    JDPJagg jaggSQL;
  14.    JDPPopupMessage popuppanel;
  15.    JDPMaskEdit JDPMaskEditMain;
  16.    String moduleParameter;
  17.    Panel Main;
  18.    JDPChiselFramePanel ChiselPanel1;
  19.    Panel Form1;
  20.    Panel Panel1;
  21.    Panel Panel2;
  22.    JDPTabSelectPanel TabPanel1;
  23.    JDPScrollPanel ScrollPanel1;
  24.    Label au_idLabel1;
  25.    TextField au_id1;
  26.    Label au_lnameLabel1;
  27.    TextField au_lname1;
  28.    Label au_fnameLabel1;
  29.    TextField au_fname1;
  30.    Label addressLabel1;
  31.    TextField address1;
  32.    Label cityLabel1;
  33.    Panel cityLine1;
  34.    TextField city1;
  35.    TextField state1;
  36.    TextField zip1;
  37.    Label phoneLabel1;
  38.    TextField phone1;
  39.    JDPScrollPanel ScrollPanel2;
  40.    Label contractLabel1;
  41.    TextField contract1;
  42.    JDPButtons JDPButtons1;
  43.    Panel Panel3;
  44.    JDPWhereClause Form1SP1;
  45.    JDPSearchResults Form1RL1;
  46.  
  47.    public void InitClass(JDPUser var1, Panel var2, String var3) {
  48.       this.user = var1;
  49.       this.moduleParameter = var3;
  50.       this.jaggSQL = new JDPJagg(var1.jaggPath);
  51.       ((Container)this).setLayout(new BorderLayout());
  52.       this.popuppanel = new JDPPopupMessage(var1, this);
  53.       ((Container)this).add(this.popuppanel);
  54.       this.JDPMaskEditMain = new JDPMaskEdit();
  55.       this.Main = new Panel();
  56.       this.ChiselPanel1 = new JDPChiselFramePanel(var1, "Author Inquiry");
  57.       this.Form1 = new Panel();
  58.       this.Panel1 = new Panel();
  59.       this.Panel2 = new Panel();
  60.       String[] var4 = new String[2];
  61.       Panel[] var5 = new Panel[]{new Panel(), null};
  62.       var5[0].setLayout(new BorderLayout());
  63.       var4[0] = "Name";
  64.       var5[1] = new Panel();
  65.       var5[1].setLayout(new BorderLayout());
  66.       var4[1] = "Contract";
  67.       this.TabPanel1 = new JDPTabSelectPanel(var1, var4, var5, "North");
  68.       this.ScrollPanel1 = new JDPScrollPanel();
  69.       this.au_idLabel1 = new Label("Id:", 0);
  70.       this.au_id1 = new TextField("au_id", 11);
  71.       this.au_lnameLabel1 = new Label("Last name:", 0);
  72.       this.au_lname1 = new TextField("au_lname", 40);
  73.       this.au_fnameLabel1 = new Label("First name:", 0);
  74.       this.au_fname1 = new TextField("au_fname", 20);
  75.       this.addressLabel1 = new Label("Address:", 0);
  76.       this.address1 = new TextField("address", 40);
  77.       this.cityLabel1 = new Label("", 0);
  78.       this.cityLine1 = new Panel();
  79.       this.city1 = new TextField("city", 20);
  80.       this.state1 = new TextField("state", 2);
  81.       this.zip1 = new TextField("zip", 5);
  82.       this.phoneLabel1 = new Label("Phone:", 0);
  83.       this.phone1 = new TextField("phone", 12);
  84.       this.ScrollPanel2 = new JDPScrollPanel();
  85.       this.contractLabel1 = new Label("Contract:", 0);
  86.       this.contract1 = new TextField("contract", 1);
  87.       String[] var6 = new String[]{"Apply", "Add", "Remove"};
  88.       int[] var7 = new int[]{JDPButton.getIconValue("Save"), JDPButton.getIconValue("New"), JDPButton.getIconValue("Delete")};
  89.       this.JDPButtons1 = new JDPButtons(var1, var6, var7, JDPButtons.getAlignmentValue("Horizontal"));
  90.       this.Panel3 = new Panel();
  91.       this.Main.setLayout(new BorderLayout());
  92.       ((Container)this).add("Center", this.Main);
  93.       this.Main.add("Center", this.ChiselPanel1);
  94.       this.ChiselPanel1.add("Center", this.Form1);
  95.       this.Form1.setLayout(new BorderLayout());
  96.       this.Form1Main();
  97.       this.Form1.add("Center", this.Panel1);
  98.       this.Panel1.setLayout(new BorderLayout());
  99.       this.Panel1.add("Center", this.Panel2);
  100.       this.Panel2.setLayout(new BorderLayout());
  101.       this.Panel2.add("Center", this.TabPanel1);
  102.       var5[0].add("Center", this.ScrollPanel1);
  103.       this.ScrollPanel1.add("Left", this.au_idLabel1);
  104.       this.ScrollPanel1.add("Right", this.au_id1);
  105.       this.ScrollPanel1.add("Left", this.au_lnameLabel1);
  106.       this.ScrollPanel1.add("Right", this.au_lname1);
  107.       this.ScrollPanel1.add("Left", this.au_fnameLabel1);
  108.       this.ScrollPanel1.add("Right", this.au_fname1);
  109.       this.ScrollPanel1.add("Left", this.addressLabel1);
  110.       this.ScrollPanel1.add("Right", this.address1);
  111.       this.ScrollPanel1.add("Left", this.cityLabel1);
  112.       this.ScrollPanel1.add("Right", this.cityLine1);
  113.       this.cityLine1.setLayout(new JDPLineLayout());
  114.       this.cityLine1.add("Left", this.city1);
  115.       this.cityLine1.add("Left", this.state1);
  116.       this.cityLine1.add("Left", this.zip1);
  117.       this.ScrollPanel1.add("Left", this.phoneLabel1);
  118.       this.ScrollPanel1.add("Right", this.phone1);
  119.       var5[1].add("Center", this.ScrollPanel2);
  120.       this.ScrollPanel2.add("Left", this.contractLabel1);
  121.       this.ScrollPanel2.add("Right", this.contract1);
  122.       this.Panel1.add("South", this.JDPButtons1);
  123.       this.Form1.add("West", this.Panel3);
  124.       this.Panel3.setLayout(new BorderLayout());
  125.       this.Panel3.add("North", this.Form1SP1);
  126.       this.Panel3.add("Center", this.Form1RL1);
  127.       this.TabPanel1.setTabcolor(0, var1.u._cvtcolor("Black"), var1.u._cvtcolor("LightGray"));
  128.       this.TabPanel1.setTabcolor(1, var1.u._cvtcolor("Black"), var1.u._cvtcolor("LightGray"));
  129.       this.ScrollPanel1.setFont(new Font("Helvetica", 0, 11));
  130.       this.ScrollPanel1.setForeground(var1.u._cvtcolor("Black"));
  131.       this.ScrollPanel1.setBackground(var1.u._cvtcolor("LightGray"));
  132.       this.au_idLabel1.setFont(new Font("Helvetica", 1, 11));
  133.       this.popuppanel.addComponent(this.au_id1, "Au Id", "");
  134.       this.au_lnameLabel1.setFont(new Font("Helvetica", 1, 11));
  135.       this.popuppanel.addComponent(this.au_lname1, "Au L name", "");
  136.       this.au_fnameLabel1.setFont(new Font("Helvetica", 1, 11));
  137.       this.popuppanel.addComponent(this.au_fname1, "Au F name", "");
  138.       this.addressLabel1.setFont(new Font("Helvetica", 1, 11));
  139.       this.popuppanel.addComponent(this.address1, "Address", "");
  140.       this.cityLabel1.setFont(new Font("Helvetica", 1, 11));
  141.       this.popuppanel.addComponent(this.city1, "City", "");
  142.       this.popuppanel.addComponent(this.state1, "State", "");
  143.       this.popuppanel.addComponent(this.zip1, "Zip", "");
  144.       this.phoneLabel1.setFont(new Font("Helvetica", 1, 11));
  145.       this.popuppanel.addComponent(this.phone1, "Phone", "");
  146.       this.ScrollPanel2.setFont(new Font("Helvetica", 0, 11));
  147.       this.ScrollPanel2.setForeground(var1.u._cvtcolor("Black"));
  148.       this.ScrollPanel2.setBackground(var1.u._cvtcolor("LightGray"));
  149.       this.contractLabel1.setFont(new Font("Helvetica", 1, 11));
  150.       this.popuppanel.addComponent(this.contract1, "Contract", "");
  151.       this.InitComponents();
  152.       var1.gParm.addElement(this);
  153.    }
  154.  
  155.    public boolean handleEvent(Event var1) {
  156.       switch (var1.id) {
  157.          case 401:
  158.             if (var1.key == 9 && var1.modifiers != 1) {
  159.                if (var1.target.equals(this.au_id1)) {
  160.                   this.user.u.cursor(this.au_lname1);
  161.                   return true;
  162.                }
  163.  
  164.                if (var1.target.equals(this.au_lname1)) {
  165.                   this.user.u.cursor(this.au_fname1);
  166.                   return true;
  167.                }
  168.  
  169.                if (var1.target.equals(this.au_fname1)) {
  170.                   this.user.u.cursor(this.address1);
  171.                   return true;
  172.                }
  173.  
  174.                if (var1.target.equals(this.address1)) {
  175.                   this.user.u.cursor(this.city1);
  176.                   return true;
  177.                }
  178.  
  179.                if (var1.target.equals(this.city1)) {
  180.                   this.user.u.cursor(this.state1);
  181.                   return true;
  182.                }
  183.  
  184.                if (var1.target.equals(this.state1)) {
  185.                   this.user.u.cursor(this.zip1);
  186.                   return true;
  187.                }
  188.  
  189.                if (var1.target.equals(this.zip1)) {
  190.                   this.user.u.cursor(this.phone1);
  191.                   return true;
  192.                }
  193.  
  194.                if (var1.target.equals(this.phone1)) {
  195.                   this.user.u.cursor(this.contract1);
  196.                   return true;
  197.                }
  198.  
  199.                if (var1.target.equals(this.contract1)) {
  200.                   this.user.u.cursor(this.au_id1);
  201.                   return true;
  202.                }
  203.             }
  204.  
  205.             if (var1.key == 9 && var1.modifiers == 1) {
  206.                if (var1.target.equals(this.au_id1)) {
  207.                   this.user.u.cursor(this.contract1);
  208.                   return true;
  209.                }
  210.  
  211.                if (var1.target.equals(this.au_lname1)) {
  212.                   this.user.u.cursor(this.au_id1);
  213.                   return true;
  214.                }
  215.  
  216.                if (var1.target.equals(this.au_fname1)) {
  217.                   this.user.u.cursor(this.au_lname1);
  218.                   return true;
  219.                }
  220.  
  221.                if (var1.target.equals(this.address1)) {
  222.                   this.user.u.cursor(this.au_fname1);
  223.                   return true;
  224.                }
  225.  
  226.                if (var1.target.equals(this.city1)) {
  227.                   this.user.u.cursor(this.address1);
  228.                   return true;
  229.                }
  230.  
  231.                if (var1.target.equals(this.state1)) {
  232.                   this.user.u.cursor(this.city1);
  233.                   return true;
  234.                }
  235.  
  236.                if (var1.target.equals(this.zip1)) {
  237.                   this.user.u.cursor(this.state1);
  238.                   return true;
  239.                }
  240.  
  241.                if (var1.target.equals(this.phone1)) {
  242.                   this.user.u.cursor(this.zip1);
  243.                   return true;
  244.                }
  245.  
  246.                if (var1.target.equals(this.contract1)) {
  247.                   this.user.u.cursor(this.phone1);
  248.                   return true;
  249.                }
  250.             }
  251.  
  252.             return false;
  253.          case 503:
  254.          case 504:
  255.          case 505:
  256.             this.popuppanel.postEvent(var1);
  257.             return false;
  258.          case 1001:
  259.             if (var1.target.equals(this.JDPButtons1.button[0])) {
  260.                this.Form1updateRow(this.Form1RL1.getSelectedKey());
  261.                return true;
  262.             } else if (var1.target.equals(this.JDPButtons1.button[1])) {
  263.                this.Form1insertRow(this.Form1RL1.getSelectedKey());
  264.                return true;
  265.             } else if (var1.target.equals(this.JDPButtons1.button[2])) {
  266.                this.Form1removeRow(this.Form1RL1.getSelectedKey());
  267.                return true;
  268.             } else if (var1.target.equals(this.Form1SP1)) {
  269.                this.Form1RL1.clearList();
  270.                this.Form1RL1.setFromWhereClause(this.Form1SP1.getFromWhereClause());
  271.                this.Form1RL1.loadList();
  272.                return true;
  273.             } else {
  274.                if (var1.target.equals(this.Form1RL1)) {
  275.                   this.Form1Load(this.Form1RL1.getSelectedKey());
  276.                   return true;
  277.                }
  278.  
  279.                return false;
  280.             }
  281.          default:
  282.             return false;
  283.       }
  284.    }
  285.  
  286.    public void InitComponents() {
  287.       this.jaggSQL.setKeepConnectionOpen(false);
  288.    }
  289.  
  290.    public void Form1Main() {
  291.       this.Form1LoadChoices();
  292.       this.Form1ClearFields();
  293.       this.Form1WhereClauseMain();
  294.       this.Form1SearchResultsMain();
  295.    }
  296.  
  297.    public void Form1Load(String[] var1) {
  298.       int var3 = 0;
  299.       Vector var4 = new Vector();
  300.       String var5 = this.jaggSQL.getSEP();
  301.       if (var1 != null && var1.length >= 0) {
  302.          String var7 = "SELECT au_id,au_lname,au_fname,phone,address,city,state,zip,contract FROM dbo_authors WHERE (1=1)";
  303.          if (var1.length > 0 && var1[0] != null) {
  304.             var7 = var7 + " AND au_id='" + var1[0] + "'";
  305.          }
  306.  
  307.          this.jaggSQL.setDSN("JDP Tutorial");
  308.          this.jaggSQL.setUID("");
  309.          this.jaggSQL.setPWD("");
  310.          this.jaggSQL.setMRW("1000");
  311.          this.jaggSQL.setTOUT("60");
  312.          this.user.mainmsg.setStatusMsg(JDPLang.get("Message0"), 0);
  313.          var3 = this.jaggSQL.execSQL(var7, var4);
  314.          if (var3 == -1) {
  315.             this.user.u.setSqlMessage(this.jaggSQL, var7);
  316.          } else if (var3 >= 1) {
  317.             String var6 = (String)var4.elementAt(0);
  318.             if (var6 != null && var6.trim().compareTo("") != 0) {
  319.                StringTokenizer var2 = new StringTokenizer(var6, var5);
  320.                this.au_id1.setText(var2.nextToken().trim());
  321.                this.au_lname1.setText(var2.nextToken().trim());
  322.                this.au_fname1.setText(var2.nextToken().trim());
  323.                this.phone1.setText(var2.nextToken().trim());
  324.                this.address1.setText(var2.nextToken().trim());
  325.                this.city1.setText(var2.nextToken().trim());
  326.                this.state1.setText(var2.nextToken().trim());
  327.                this.zip1.setText(var2.nextToken().trim());
  328.                this.contract1.setText(var2.nextToken().trim());
  329.             }
  330.  
  331.             if (var3 > 1) {
  332.                this.user.mainmsg.setStatusMsg(JDPLang.get("Message1"), 10);
  333.             } else {
  334.                this.user.mainmsg.clearStatusMsg();
  335.             }
  336.          } else {
  337.             this.user.mainmsg.setStatusMsg(JDPLang.get("Message2"), 10);
  338.             this.Form1ClearFields();
  339.          }
  340.       } else {
  341.          this.Form1ClearFields();
  342.       }
  343.    }
  344.  
  345.    public boolean Form1updateRow(String[] var1) {
  346.       return this.Form1CheckFields() ? this.Form1Save(var1, "U") : false;
  347.    }
  348.  
  349.    public boolean Form1insertRow(String[] var1) {
  350.       return this.Form1CheckFields() ? this.Form1Save(var1, "I") : false;
  351.    }
  352.  
  353.    public boolean Form1removeRow(String[] var1) {
  354.       return this.Form1Save(var1, "D");
  355.    }
  356.  
  357.    boolean Form1Save(String[] var1, String var2) {
  358.       int var3 = 0;
  359.       Vector var4 = new Vector();
  360.       this.jaggSQL.getSEP();
  361.       String var5 = "";
  362.       Object var6 = null;
  363.       if (var2.equals("I")) {
  364.          var5 = "INSERT INTO dbo_authors (au_id, au_lname, au_fname, phone, address, city, state, zip, contract) VALUES('" + this.user.u.replace(this.au_id1.getText(), "'", "''") + "', " + "'" + this.user.u.replace(this.au_lname1.getText(), "'", "''") + "', " + "'" + this.user.u.replace(this.au_fname1.getText(), "'", "''") + "', " + "'" + this.user.u.replace(this.phone1.getText(), "'", "''") + "', " + "'" + this.user.u.replace(this.address1.getText(), "'", "''") + "', " + "'" + this.user.u.replace(this.city1.getText(), "'", "''") + "', " + "'" + this.user.u.replace(this.state1.getText(), "'", "''") + "', " + "'" + this.user.u.replace(this.zip1.getText(), "'", "''") + "', " + "'" + this.user.u.replace(this.contract1.getText(), "'", "''") + "')";
  365.       } else {
  366.          if (var1 == null || var1.length == 0) {
  367.             this.user.mainmsg.setStatusMsg(JDPLang.get("Message3"), 5);
  368.             return false;
  369.          }
  370.  
  371.          if (var2.equals("D")) {
  372.             var5 = "DELETE FROM dbo_authors WHERE au_id='" + var1[0] + "'";
  373.          } else {
  374.             var5 = "UPDATE dbo_authors SET au_lname = '" + this.user.u.replace(this.au_lname1.getText(), "'", "''") + "', " + "au_fname = '" + this.user.u.replace(this.au_fname1.getText(), "'", "''") + "', " + "phone = '" + this.user.u.replace(this.phone1.getText(), "'", "''") + "', " + "address = '" + this.user.u.replace(this.address1.getText(), "'", "''") + "', " + "city = '" + this.user.u.replace(this.city1.getText(), "'", "''") + "', " + "state = '" + this.user.u.replace(this.state1.getText(), "'", "''") + "', " + "zip = '" + this.user.u.replace(this.zip1.getText(), "'", "''") + "', " + "contract = '" + this.user.u.replace(this.contract1.getText(), "'", "''") + "'" + " WHERE au_id='" + var1[0] + "'";
  375.          }
  376.       }
  377.  
  378.       this.jaggSQL.setDSN("JDP Tutorial");
  379.       this.jaggSQL.setUID("");
  380.       this.jaggSQL.setPWD("");
  381.       this.jaggSQL.setMRW("1000");
  382.       this.jaggSQL.setTOUT("60");
  383.       this.user.mainmsg.setStatusMsg(JDPLang.get("Message0"), 0);
  384.       var3 = this.jaggSQL.execSQL(var5, var4);
  385.       if (var3 == 0 && var6 != null) {
  386.          String[] var7 = new String[]{JDPLang.get("Reload"), JDPLang.get("Update")};
  387.          int[] var8 = new int[]{6, 0};
  388.          JDPMessageDialog var9 = new JDPMessageDialog(this.user, this.user.jdpMainWindow, JDPLang.get("Dialog0"), JDPLang.get("Dialog1"), var7, var8);
  389.          ((JDPDialog)var9).display();
  390.          if (var9.getPressedButton() != 1) {
  391.             this.Form1Load(var1);
  392.             return true;
  393.          }
  394.  
  395.          var4 = new Vector();
  396.          var3 = this.jaggSQL.execSQL((String)var6, var4);
  397.       }
  398.  
  399.       if (var3 == -1) {
  400.          this.user.u.setSqlMessage(this.jaggSQL, var5);
  401.          return false;
  402.       } else {
  403.          if (var3 == 1) {
  404.             if (var2.equals("I")) {
  405.                this.user.mainmsg.setStatusMsg(JDPLang.get("Message4"), 3);
  406.             } else if (var2.equals("D")) {
  407.                this.user.mainmsg.setStatusMsg(JDPLang.get("Message5"), 3);
  408.             } else {
  409.                this.user.mainmsg.setStatusMsg(JDPLang.get("Message6"), 3);
  410.             }
  411.          } else {
  412.             this.user.u.setSqlMessage(this.jaggSQL, var5);
  413.          }
  414.  
  415.          if (var6 != null) {
  416.             this.Form1Load(var1);
  417.          }
  418.  
  419.          return true;
  420.       }
  421.    }
  422.  
  423.    public void Form1ClearFields() {
  424.       this.au_id1.setText("");
  425.       this.au_lname1.setText("");
  426.       this.au_fname1.setText("");
  427.       this.phone1.setText("");
  428.       this.address1.setText("");
  429.       this.city1.setText("");
  430.       this.state1.setText("");
  431.       this.zip1.setText("");
  432.       this.contract1.setText("");
  433.    }
  434.  
  435.    void Form1LoadChoices() {
  436.       this.jaggSQL.setDSN("JDP Tutorial");
  437.       this.jaggSQL.setUID("");
  438.       this.jaggSQL.setPWD("");
  439.       this.jaggSQL.setMRW("1000");
  440.       this.jaggSQL.setTOUT("60");
  441.    }
  442.  
  443.    public boolean Form1CheckFields() {
  444.       return true;
  445.    }
  446.  
  447.    public void Form1WhereClauseMain() {
  448.       String[] var1 = new String[4];
  449.       String[] var2 = new String[4];
  450.       Vector var3 = new Vector();
  451.       Vector var4 = new Vector();
  452.       var1[0] = "Last name";
  453.       var2[0] = "au_lname";
  454.       var1[1] = "First name";
  455.       var2[1] = "au_fname";
  456.       var1[2] = "Address";
  457.       var2[2] = "address";
  458.       var1[3] = "City";
  459.       var2[3] = "city";
  460.       var3.addElement(new Vector());
  461.       var4.addElement(new Vector());
  462.       var3.addElement(new Vector());
  463.       var4.addElement(new Vector());
  464.       var3.addElement(new Vector());
  465.       var4.addElement(new Vector());
  466.       var3.addElement(new Vector());
  467.       var4.addElement(new Vector());
  468.       ((Vector)var3.elementAt(0)).addElement("Begins with");
  469.       ((Vector)var4.elementAt(0)).addElement("like");
  470.       ((Vector)var3.elementAt(0)).addElement("Contains");
  471.       ((Vector)var4.elementAt(0)).addElement("like");
  472.       ((Vector)var3.elementAt(1)).addElement("Begins with");
  473.       ((Vector)var4.elementAt(1)).addElement("like");
  474.       ((Vector)var3.elementAt(1)).addElement("Contains");
  475.       ((Vector)var4.elementAt(1)).addElement("like");
  476.       ((Vector)var3.elementAt(2)).addElement("Begins with");
  477.       ((Vector)var4.elementAt(2)).addElement("like");
  478.       ((Vector)var3.elementAt(2)).addElement("Contains");
  479.       ((Vector)var4.elementAt(2)).addElement("like");
  480.       ((Vector)var3.elementAt(3)).addElement("Begins with");
  481.       ((Vector)var4.elementAt(3)).addElement("like");
  482.       ((Vector)var3.elementAt(3)).addElement("Contains");
  483.       ((Vector)var4.elementAt(3)).addElement("like");
  484.       int[] var5 = new int[4];
  485.       boolean[] var6 = new boolean[4];
  486.       var5[0] = 42;
  487.       var6[0] = true;
  488.       var5[1] = 22;
  489.       var6[1] = true;
  490.       var5[2] = 42;
  491.       var6[2] = true;
  492.       var5[3] = 22;
  493.       var6[3] = true;
  494.       this.Form1SP1 = new JDPWhereClause(this.user, super.targetPanel, "", true, "", var1, var2, var3, var4, (String[][])null, (String[][])null, var5, var6, "FROM dbo_authors WHERE (1=1)");
  495.       this.Form1SP1.setDSNType("ACCESS");
  496.       this.Form1SP1.setDataType(0, 12);
  497.       this.Form1SP1.setDataType(1, 12);
  498.       this.Form1SP1.setDataType(2, 12);
  499.       this.Form1SP1.setDataType(3, 12);
  500.    }
  501.  
  502.    public void Form1SearchResultsMain() {
  503.       String var1 = "au_id";
  504.       String[] var2 = new String[0];
  505.       String var3 = "(1=1)";
  506.       String[] var4 = new String[]{"Last name", "First name"};
  507.       String[] var5 = new String[]{"au_lname", "au_fname"};
  508.       JDPJagg var6 = new JDPJagg(this.user.jaggPath);
  509.       var6.setDSN("JDP Tutorial");
  510.       var6.setUID("");
  511.       var6.setPWD("");
  512.       var6.setMRW("1000");
  513.       var6.setTOUT("60");
  514.       this.Form1RL1 = new JDPSearchResults(this.user, super.targetPanel, true, var6, false, var1, var2, var3, var4, var5, var5, "", true, "Total Entries:");
  515.       int[] var7 = new int[11];
  516.       var7[0] = 3;
  517.       var7[1] = 5;
  518.       this.Form1RL1.setMinWidth(160);
  519.       this.Form1RL1.setIcons(var7);
  520.       this.Form1RL1.setFromWhereClause(" FROM dbo_authors WHERE (1=1)");
  521.       this.Form1RL1.clearList("Authors");
  522.       this.Form1RL1.loadList();
  523.    }
  524. }
  525.