home *** CD-ROM | disk | FTP | other *** search
/ CD Actual Thematic 7: Programming / CDAT7.iso / Share / Java / JDesignerPro / Jdp3_0.exe / data1.cab / HelpDesk_Module / SupportRequest.class (.txt) < prev    next >
Encoding:
Java Class File  |  1999-04-09  |  14.3 KB  |  524 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.TextArea;
  8. import java.awt.TextField;
  9. import java.util.Date;
  10. import java.util.StringTokenizer;
  11. import java.util.Vector;
  12.  
  13. public class SupportRequest extends JDPClassLayout {
  14.    JDPUser user;
  15.    JDPJagg jaggSQL;
  16.    JDPPopupMessage popuppanel;
  17.    JDPMaskEdit JDPMaskEditMain;
  18.    String moduleParameter;
  19.    Panel Main;
  20.    JDPChiselFramePanel ChiselPanel1;
  21.    Panel Form1;
  22.    JDPScrollPanel ScrollPanel1;
  23.    Label LASTNAMELabel1;
  24.    Panel LASTNAMELine1;
  25.    TextField LASTNAME1;
  26.    Label FIRSTNAMELabel1;
  27.    TextField FIRSTNAME1;
  28.    Label EMPIDLabel1;
  29.    TextField EMPID1;
  30.    Label PHONELabel1;
  31.    Panel PHONELine1;
  32.    TextField PHONE1;
  33.    Label EMAILLabel1;
  34.    TextField EMAIL1;
  35.    Label IMPACTLabel1;
  36.    Panel IMPACTLine1;
  37.    JDPChoice IMPACT1;
  38.    Vector valueIMPACT1;
  39.    Label ENTRYDATELabel1;
  40.    JDPDate ENTRYDATE1;
  41.    Label PROBTYPELabel1;
  42.    JDPChoice PROBTYPE1;
  43.    Vector valuePROBTYPE1;
  44.    Label ITEMAFFECTLabel1;
  45.    TextField ITEMAFFECT1;
  46.    Label PROBSUMMLabel1;
  47.    TextField PROBSUMM1;
  48.    Label CALLIDLabel1;
  49.    TextField CALLID1;
  50.    JDPButtons JDPButtons1;
  51.    Panel Panel1;
  52.    TextArea PROBDETAIL1;
  53.    Label PROBDETAILLabel1;
  54.  
  55.    public void InitClass(JDPUser var1, Panel var2, String var3) {
  56.       this.user = var1;
  57.       this.moduleParameter = var3;
  58.       super.targetPanel = var2;
  59.       this.jaggSQL = new JDPJagg(var1.jaggPath);
  60.       ((Container)this).setLayout(new BorderLayout());
  61.       this.popuppanel = new JDPPopupMessage(var1, this);
  62.       ((Container)this).add(this.popuppanel);
  63.       this.JDPMaskEditMain = new JDPMaskEdit();
  64.       this.Main = new Panel();
  65.       this.ChiselPanel1 = new JDPChiselFramePanel(var1, "Support Request");
  66.       this.Form1 = new Panel();
  67.       this.ScrollPanel1 = new JDPScrollPanel();
  68.       this.LASTNAMELabel1 = new Label("Last Name:", 0);
  69.       this.LASTNAMELine1 = new Panel();
  70.       this.LASTNAME1 = new TextField("LASTNAME", 15);
  71.       this.FIRSTNAMELabel1 = new Label("First Name:", 0);
  72.       this.FIRSTNAME1 = new TextField("FIRSTNAME", 10);
  73.       this.EMPIDLabel1 = new Label("ID:", 0);
  74.       this.EMPID1 = new TextField("EMPID", 8);
  75.       this.PHONELabel1 = new Label("Phone:", 0);
  76.       this.PHONELine1 = new Panel();
  77.       this.PHONE1 = new TextField("PHONE", 13);
  78.       this.EMAILLabel1 = new Label("Email:", 0);
  79.       this.EMAIL1 = new TextField("EMAIL", 30);
  80.       this.IMPACTLabel1 = new Label("Impact:", 0);
  81.       this.IMPACTLine1 = new Panel();
  82.       this.IMPACT1 = new JDPChoice();
  83.       this.ENTRYDATELabel1 = new Label("Entry Date:", 0);
  84.       this.ENTRYDATE1 = new JDPDate(var1, "", 12);
  85.       this.PROBTYPELabel1 = new Label("Problem Type:", 0);
  86.       this.PROBTYPE1 = new JDPChoice();
  87.       this.ITEMAFFECTLabel1 = new Label("Item Affected:", 0);
  88.       this.ITEMAFFECT1 = new TextField("ITEMAFFECT", 30);
  89.       this.PROBSUMMLabel1 = new Label("Problem Summary:", 0);
  90.       this.PROBSUMM1 = new TextField("PROBSUMM", 48);
  91.       this.CALLIDLabel1 = new Label("Call ID:", 0);
  92.       this.CALLID1 = new TextField("CALLID", 6);
  93.       String[] var4 = new String[]{"Submit", "Clear"};
  94.       int[] var5 = new int[]{JDPButton.getIconValue("Save"), JDPButton.getIconValue("New")};
  95.       this.JDPButtons1 = new JDPButtons(var1, var4, var5, JDPButtons.getAlignmentValue("Horizontal"));
  96.       this.Panel1 = new Panel();
  97.       this.PROBDETAIL1 = new TextArea("PROBDETAIL", 6, 48);
  98.       this.PROBDETAILLabel1 = new Label("Problem Detail:", 0);
  99.       this.Main.setLayout(new BorderLayout());
  100.       this.Main.setForeground(var1.u._cvtcolor("Black"));
  101.       this.Main.setBackground(var1.u._cvtcolor("LightGray"));
  102.       ((Container)this).add("Center", this.Main);
  103.       this.Main.add("Center", this.ChiselPanel1);
  104.       this.ChiselPanel1.add("Center", this.Form1);
  105.       this.Form1.setLayout(new BorderLayout());
  106.       this.Form1Main();
  107.       this.Form1.add("North", this.ScrollPanel1);
  108.       this.ScrollPanel1.add("Left", this.LASTNAMELabel1);
  109.       this.ScrollPanel1.add("Right", this.LASTNAMELine1);
  110.       this.LASTNAMELine1.setLayout(new JDPLineLayout());
  111.       this.LASTNAMELine1.add("Left", this.LASTNAME1);
  112.       this.LASTNAMELine1.add("Left", this.FIRSTNAMELabel1);
  113.       this.LASTNAMELine1.add("Left", this.FIRSTNAME1);
  114.       this.LASTNAMELine1.add("Left", this.EMPIDLabel1);
  115.       this.LASTNAMELine1.add("Left", this.EMPID1);
  116.       this.ScrollPanel1.add("Left", this.PHONELabel1);
  117.       this.ScrollPanel1.add("Right", this.PHONELine1);
  118.       this.PHONELine1.setLayout(new JDPLineLayout());
  119.       this.PHONELine1.add("Left", this.PHONE1);
  120.       this.PHONELine1.add("Left", this.EMAILLabel1);
  121.       this.PHONELine1.add("Left", this.EMAIL1);
  122.       this.ScrollPanel1.add("Left", this.IMPACTLabel1);
  123.       this.ScrollPanel1.add("Right", this.IMPACTLine1);
  124.       this.IMPACTLine1.setLayout(new JDPLineLayout());
  125.       this.IMPACTLine1.add("Left", this.IMPACT1);
  126.       this.IMPACTLine1.add("Left", this.ENTRYDATELabel1);
  127.       this.IMPACTLine1.add("Left", this.ENTRYDATE1);
  128.       this.ScrollPanel1.add("Left", this.PROBTYPELabel1);
  129.       this.ScrollPanel1.add("Right", this.PROBTYPE1);
  130.       this.ScrollPanel1.add("Left", this.ITEMAFFECTLabel1);
  131.       this.ScrollPanel1.add("Right", this.ITEMAFFECT1);
  132.       this.ScrollPanel1.add("Left", this.PROBSUMMLabel1);
  133.       this.ScrollPanel1.add("Right", this.PROBSUMM1);
  134.       this.ScrollPanel1.add("Left", this.CALLIDLabel1);
  135.       this.ScrollPanel1.add("Right", this.CALLID1);
  136.       this.Form1.add("South", this.JDPButtons1);
  137.       this.Form1.add("Center", this.Panel1);
  138.       this.Panel1.setLayout(new BorderLayout());
  139.       this.Panel1.add("Center", this.PROBDETAIL1);
  140.       this.Panel1.add("North", this.PROBDETAILLabel1);
  141.       this.LASTNAMELabel1.setFont(new Font("Helvetica", 1, 11));
  142.       this.popuppanel.addComponent(this.LASTNAME1, "Last Name", "Enter your last name.");
  143.       this.FIRSTNAMELabel1.setFont(new Font("Helvetica", 1, 11));
  144.       this.popuppanel.addComponent(this.FIRSTNAME1, "First Name", "Enter your first name.");
  145.       this.EMPIDLabel1.setFont(new Font("Helvetica", 1, 11));
  146.       this.popuppanel.addComponent(this.EMPID1, "Employee ID", "Enter your Employee ID code.");
  147.       this.PHONELabel1.setFont(new Font("Helvetica", 1, 11));
  148.       this.popuppanel.addComponent(this.PHONE1, "Phone", "Enter your phone number and extension.");
  149.       this.EMAILLabel1.setFont(new Font("Helvetica", 1, 11));
  150.       this.popuppanel.addComponent(this.EMAIL1, "Email", "Enter your complete Email address.");
  151.       this.IMPACTLabel1.setFont(new Font("Helvetica", 1, 11));
  152.       this.IMPACT1.setForeground(var1.u._cvtcolor("Red"));
  153.       this.popuppanel.addComponent(this.IMPACT1, "Impact", "How much does this affect your ability to work?");
  154.       this.ENTRYDATELabel1.setFont(new Font("Helvetica", 1, 11));
  155.       this.ENTRYDATE1.setForeground(var1.u._cvtcolor("Blue"));
  156.       this.popuppanel.addComponent(this.ENTRYDATE1, "Entry Date", "Date defaults to todays date.");
  157.       this.PROBTYPELabel1.setFont(new Font("Helvetica", 1, 11));
  158.       this.popuppanel.addComponent(this.PROBTYPE1, "Problem Type", "Select the type of problem you are having.");
  159.       this.ITEMAFFECTLabel1.setFont(new Font("Helvetica", 1, 11));
  160.       this.popuppanel.addComponent(this.ITEMAFFECT1, "Item Affected", "Enter the exact item affected by the problem.");
  161.       this.PROBSUMMLabel1.setFont(new Font("Helvetica", 1, 11));
  162.       this.popuppanel.addComponent(this.PROBSUMM1, "Problem Summary", "Give a one-sentence description of the problem.");
  163.       this.CALLIDLabel1.setFont(new Font("Helvetica", 1, 11));
  164.       this.CALLID1.setEditable(false);
  165.       this.popuppanel.addComponent(this.CALLID1, "Call ID", "This is assigned automatically.");
  166.       this.CALLID1.setEditable(false);
  167.       this.popuppanel.addComponent(this.PROBDETAIL1, "Problem Detail", "Enter a detailed description of the problem.");
  168.       this.PROBDETAILLabel1.setFont(new Font("Helvetica", 1, 11));
  169.       var1.gParm.addElement(this);
  170.       this.InitComponents();
  171.    }
  172.  
  173.    public boolean handleEvent(Event var1) {
  174.       switch (var1.id) {
  175.          case 401:
  176.             if (var1.key == 9 && var1.modifiers != 1) {
  177.                if (var1.target.equals(this.LASTNAME1)) {
  178.                   this.user.u.cursor(this.FIRSTNAME1);
  179.                }
  180.  
  181.                if (var1.target.equals(this.FIRSTNAME1)) {
  182.                   this.user.u.cursor(this.EMPID1);
  183.                }
  184.  
  185.                if (var1.target.equals(this.EMPID1)) {
  186.                   this.user.u.cursor(this.PHONE1);
  187.                }
  188.  
  189.                if (var1.target.equals(this.PHONE1)) {
  190.                   this.user.u.cursor(this.EMAIL1);
  191.                }
  192.  
  193.                if (var1.target.equals(this.EMAIL1)) {
  194.                   this.user.u.cursor(this.IMPACT1);
  195.                }
  196.  
  197.                if (var1.target.equals(this.IMPACT1)) {
  198.                   this.user.u.cursor(this.PROBTYPE1);
  199.                }
  200.  
  201.                if (var1.target.equals(this.ENTRYDATE1)) {
  202.                   this.user.u.cursor(this.PROBTYPE1);
  203.                }
  204.  
  205.                if (var1.target.equals(this.PROBTYPE1)) {
  206.                   this.user.u.cursor(this.ITEMAFFECT1);
  207.                }
  208.  
  209.                if (var1.target.equals(this.ITEMAFFECT1)) {
  210.                   this.user.u.cursor(this.PROBSUMM1);
  211.                }
  212.  
  213.                if (var1.target.equals(this.PROBSUMM1)) {
  214.                   this.user.u.cursor(this.PROBDETAIL1);
  215.                }
  216.  
  217.                if (var1.target.equals(this.CALLID1)) {
  218.                   this.user.u.cursor(this.LASTNAME1);
  219.                }
  220.  
  221.                if (var1.target.equals(this.PROBDETAIL1)) {
  222.                   this.user.u.cursor(this.LASTNAME1);
  223.                }
  224.             }
  225.  
  226.             if (var1.key == 9 && var1.modifiers == 1) {
  227.                if (var1.target.equals(this.LASTNAME1)) {
  228.                   this.user.u.cursor(this.CALLID1);
  229.                   return true;
  230.                }
  231.  
  232.                if (var1.target.equals(this.FIRSTNAME1)) {
  233.                   this.user.u.cursor(this.LASTNAME1);
  234.                   return true;
  235.                }
  236.  
  237.                if (var1.target.equals(this.EMPID1)) {
  238.                   this.user.u.cursor(this.FIRSTNAME1);
  239.                   return true;
  240.                }
  241.  
  242.                if (var1.target.equals(this.PHONE1)) {
  243.                   this.user.u.cursor(this.EMPID1);
  244.                   return true;
  245.                }
  246.  
  247.                if (var1.target.equals(this.EMAIL1)) {
  248.                   this.user.u.cursor(this.PHONE1);
  249.                   return true;
  250.                }
  251.  
  252.                if (var1.target.equals(this.IMPACT1)) {
  253.                   this.user.u.cursor(this.EMAIL1);
  254.                   return true;
  255.                }
  256.  
  257.                if (var1.target.equals(this.ENTRYDATE1)) {
  258.                   this.user.u.cursor(this.IMPACT1);
  259.                   return true;
  260.                }
  261.  
  262.                if (var1.target.equals(this.PROBTYPE1)) {
  263.                   this.user.u.cursor(this.ENTRYDATE1);
  264.                   return true;
  265.                }
  266.  
  267.                if (var1.target.equals(this.ITEMAFFECT1)) {
  268.                   this.user.u.cursor(this.PROBTYPE1);
  269.                   return true;
  270.                }
  271.  
  272.                if (var1.target.equals(this.PROBSUMM1)) {
  273.                   this.user.u.cursor(this.ITEMAFFECT1);
  274.                   return true;
  275.                }
  276.  
  277.                if (var1.target.equals(this.CALLID1)) {
  278.                   this.user.u.cursor(this.PROBDETAIL1);
  279.                   return true;
  280.                }
  281.  
  282.                if (var1.target.equals(this.PROBDETAIL1)) {
  283.                   this.user.u.cursor(this.PROBSUMM1);
  284.                   return true;
  285.                }
  286.             }
  287.  
  288.             return false;
  289.          case 503:
  290.          case 504:
  291.          case 505:
  292.             this.popuppanel.postEvent(var1);
  293.             return false;
  294.          case 1001:
  295.             if (var1.target.equals(this.JDPButtons1.button[0])) {
  296.                this.Form1insertRow((String[])null);
  297.                this.CALLID1.setText(this.getCallID());
  298.                return true;
  299.             } else {
  300.                if (var1.target.equals(this.JDPButtons1.button[1])) {
  301.                   this.Form1ClearFields();
  302.                   return true;
  303.                }
  304.  
  305.                return false;
  306.             }
  307.          default:
  308.             return false;
  309.       }
  310.    }
  311.  
  312.    public void InitComponents() {
  313.       this.jaggSQL.setKeepConnectionOpen(false);
  314.       this.ENTRYDATE1.setDate(new Date());
  315.    }
  316.  
  317.    public void Form1Main() {
  318.       this.Form1LoadChoices();
  319.       this.Form1ClearFields();
  320.       this.Form1WhereClauseMain();
  321.       this.Form1SearchResultsMain();
  322.    }
  323.  
  324.    public void Form1Load(String[] var1) {
  325.       int var3 = 0;
  326.       Vector var4 = new Vector();
  327.       String var5 = this.jaggSQL.getSEP();
  328.       if (var1 != null && var1.length >= 0) {
  329.          String var8 = "SELECT LASTNAME,FIRSTNAME,EMPID,PHONE,EMAIL,PROBTYPE,ITEMAFFECT,PROBSUMM,IMPACT,PROBDETAIL,CALLID,ENTRYDATE FROM JDPHelpDesk WHERE (1=1)";
  330.          if (var1.length > 0 && var1[0] != null) {
  331.             var8 = var8 + " AND CALLID=" + var1[0] + "";
  332.          }
  333.  
  334.          this.jaggSQL.setDSN("JDPHelpDesk");
  335.          this.jaggSQL.setUID("");
  336.          this.jaggSQL.setPWD("");
  337.          this.jaggSQL.setMRW("1000");
  338.          this.jaggSQL.setTOUT("60");
  339.          this.user.mainmsg.setStatusMsg(JDPLang.get("Message0"), 0);
  340.          var3 = this.jaggSQL.execSQL(var8, var4);
  341.          if (var3 == -1) {
  342.             this.user.u.setSqlMessage(this.jaggSQL, var8);
  343.          } else if (var3 >= 1) {
  344.             String var6 = (String)var4.elementAt(0);
  345.             if (var6 != null && var6.trim().compareTo("") != 0) {
  346.                StringTokenizer var2 = new StringTokenizer(var6, var5);
  347.                this.LASTNAME1.setText(var2.nextToken().trim());
  348.                this.FIRSTNAME1.setText(var2.nextToken().trim());
  349.                this.EMPID1.setText(var2.nextToken().trim());
  350.                this.PHONE1.setText(var2.nextToken().trim());
  351.                this.EMAIL1.setText(var2.nextToken().trim());
  352.                String var7 = var2.nextToken(var5).trim();
  353.                if (this.valuePROBTYPE1.indexOf(var7) >= 0) {
  354.                   this.PROBTYPE1.select(this.valuePROBTYPE1.indexOf(var7));
  355.                }
  356.  
  357.                this.ITEMAFFECT1.setText(var2.nextToken().trim());
  358.                this.PROBSUMM1.setText(var2.nextToken().trim());
  359.                var7 = var2.nextToken(var5).trim();
  360.                if (this.valueIMPACT1.indexOf(var7) >= 0) {
  361.                   this.IMPACT1.select(this.valueIMPACT1.indexOf(var7));
  362.                }
  363.  
  364.                this.PROBDETAIL1.setText(var2.nextToken().trim());
  365.                this.CALLID1.setText(var2.nextToken().trim());
  366.                this.ENTRYDATE1.setText(JDPDate.format(Long.valueOf(var2.nextToken())));
  367.             }
  368.  
  369.             if (var3 > 1) {
  370.                this.user.mainmsg.setStatusMsg(JDPLang.get("Message1"), 10);
  371.             } else {
  372.                this.user.mainmsg.clearStatusMsg();
  373.             }
  374.          } else {
  375.             this.user.mainmsg.setStatusMsg(JDPLang.get("Message2"), 10);
  376.             this.Form1ClearFields();
  377.          }
  378.       } else {
  379.          this.Form1ClearFields();
  380.       }
  381.    }
  382.  
  383.    public boolean Form1updateRow(String[] var1) {
  384.       return this.Form1CheckFields() ? this.Form1Save(var1, "U") : false;
  385.    }
  386.  
  387.    public boolean Form1insertRow(String[] var1) {
  388.       return this.Form1CheckFields() ? this.Form1Save(var1, "I") : false;
  389.    }
  390.  
  391.    public boolean Form1removeRow(String[] var1) {
  392.       return this.Form1Save(var1, "D");
  393.    }
  394.  
  395.    boolean Form1Save(String[] var1, String var2) {
  396.       int var3 = 0;
  397.       Vector var4 = new Vector();
  398.       this.jaggSQL.getSEP();
  399.       String var5 = "";
  400.       Object var6 = null;
  401.       if (var2.equals("I")) {
  402.          var5 = "INSERT INTO JDPHelpDesk (LASTNAME, FIRSTNAME, EMPID, PHONE, EMAIL, PROBTYPE, ITEMAFFECT, POSSOLUTN, PROBSUMM, IMPACT, PROBDETAIL, WORKLOG, ASSIGNEDTO, STATUS, ENTRYDATE, FINLSOLUTN) VALUES('" + this.user.u.replace(this.LASTNAME1.getText(), "'", "''") + "', " + "'" + this.user.u.replace(this.FIRSTNAME1.getText(), "'", "''") + "', " + "'" + this.user.u.replace(this.EMPID1.getText(), "'", "''") + "', " + "'" + this.user.u.replace(this.PHONE1.getText(), "'", "''") + "', " + "'" + this.user.u.replace(this.EMAIL1.getText(), "'", "''") + "', " + "'" + (String)this.valuePROBTYPE1.elementAt(this.PROBTYPE1.getSelectedIndex()) + "', " + "'" + this.user.u.replace(this.ITEMAFFECT1.getText(), "'", "''") + "', " + "'', " + "'" + this.user.u.replace(this.PROBSUMM1.getText(), "'", "''") + "', " + "'" + (String)this.valueIMPACT1.elementAt(this.IMPACT1.getSelectedIndex()) + "', " + "'" + this.user.u.replace(this.PROBDETAIL1.getText(), "'", "''") + "', " + "'', " + "'', " + "'Progress', " + "'" + JDPDate.format(this.ENTRYDATE1.getText()) + "', " + "'')";
  403.       } else {
  404.          if (var1 == null || var1.length == 0) {
  405.             this.user.mainmsg.setStatusMsg(JDPLang.get("Message3"), 5);
  406.             return false;
  407.          }
  408.  
  409.          if (var2.equals("D")) {
  410.             var5 = "DELETE FROM JDPHelpDesk WHERE CALLID=" + var1[0];
  411.          } else {
  412.             var5 = "UPDATE JDPHelpDesk SET LASTNAME = '" + this.user.u.replace(this.LASTNAME1.getText(), "'", "''") + "', " + "FIRSTNAME = '" + this.user.u.replace(this.FIRSTNAME1.getText(), "'", "''") + "', " + "EMPID = '" + this.user.u.replace(this.EMPID1.getText(), "'", "''") + "', " + "PHONE = '" + this.user.u.replace(this.PHONE1.getText(), "'", "''") + "', " + "EMAIL = '" + this.user.u.replace(this.EMAIL1.getText(), "'", "''") + "', " + "PROBTYPE = '" + (String)this.valuePROBTYPE1.elementAt(this.PROBTYPE1.getSelectedIndex()) + "', " + "ITEMAFFECT = '" + this.user.u.replace(this.ITEMAFFECT1.getText(), "'", "''") + "', " + "PROBSUMM = '" + this.user.u.replace(this.PROBSUMM1.getText(), "'", "''") + "', " + "IMPACT = '" + (String)this.valueIMPACT1.elementAt(this.IMPACT1.getSelectedIndex()) + "', " + "PROBDETAIL = '" + this.user.u.replace(this.PROBDETAIL1.getText(), "'", "''") + "'" + " WHERE CALLID=" + var1[0];
  413.          }
  414.       }
  415.  
  416.       this.jaggSQL.setDSN("JDPHelpDesk");
  417.       this.jaggSQL.setUID("");
  418.       this.jaggSQL.setPWD("");
  419.       this.jaggSQL.setMRW("1000");
  420.       this.jaggSQL.setTOUT("60");
  421.       this.user.mainmsg.setStatusMsg(JDPLang.get("Message0"), 0);
  422.       var3 = this.jaggSQL.execSQL(var5, var4);
  423.       if (var3 == 0 && var6 != null) {
  424.          String[] var7 = new String[]{JDPLang.get("Reload"), JDPLang.get("Update")};
  425.          int[] var8 = new int[]{6, 0};
  426.          JDPMessageDialog var9 = new JDPMessageDialog(this.user, this.user.jdpMainWindow, JDPLang.get("Dialog0"), JDPLang.get("Dialog1"), var7, var8);
  427.          ((JDPDialog)var9).display();
  428.          if (var9.getPressedButton() != 1) {
  429.             this.Form1Load(var1);
  430.             return true;
  431.          }
  432.  
  433.          var4 = new Vector();
  434.          var3 = this.jaggSQL.execSQL((String)var6, var4);
  435.       }
  436.  
  437.       if (var3 == -1) {
  438.          this.user.u.setSqlMessage(this.jaggSQL, var5);
  439.          return false;
  440.       } else {
  441.          if (var3 == 1) {
  442.             if (var2.equals("I")) {
  443.                this.user.mainmsg.setStatusMsg(JDPLang.get("Message4"), 3);
  444.             } else if (var2.equals("D")) {
  445.                this.user.mainmsg.setStatusMsg(JDPLang.get("Message5"), 3);
  446.             } else {
  447.                this.user.mainmsg.setStatusMsg(JDPLang.get("Message6"), 3);
  448.             }
  449.          } else {
  450.             this.user.u.setSqlMessage(this.jaggSQL, var5);
  451.          }
  452.  
  453.          if (var6 != null) {
  454.             this.Form1Load(var1);
  455.          }
  456.  
  457.          return true;
  458.       }
  459.    }
  460.  
  461.    public void Form1ClearFields() {
  462.       this.LASTNAME1.setText("");
  463.       this.FIRSTNAME1.setText("");
  464.       this.EMPID1.setText("");
  465.       this.PHONE1.setText("");
  466.       this.EMAIL1.setText("");
  467.       this.PROBTYPE1.select(0);
  468.       this.ITEMAFFECT1.setText("");
  469.       this.PROBSUMM1.setText("");
  470.       this.IMPACT1.select(0);
  471.       this.PROBDETAIL1.setText("");
  472.       this.CALLID1.setText("");
  473.       this.ENTRYDATE1.setText("");
  474.    }
  475.  
  476.    void Form1LoadChoices() {
  477.       this.jaggSQL.setDSN("JDPHelpDesk");
  478.       this.jaggSQL.setUID("");
  479.       this.jaggSQL.setPWD("");
  480.       this.jaggSQL.setMRW("1000");
  481.       this.jaggSQL.setTOUT("60");
  482.       this.valueIMPACT1 = new Vector();
  483.       this.IMPACT1.addItem("Low");
  484.       this.valueIMPACT1.addElement("Low");
  485.       this.IMPACT1.addItem("Medium");
  486.       this.valueIMPACT1.addElement("Medium");
  487.       this.IMPACT1.addItem("High");
  488.       this.valueIMPACT1.addElement("High");
  489.       this.valuePROBTYPE1 = new Vector();
  490.       new JDPLoadChoice(this.user, this.jaggSQL, this.PROBTYPE1, "PROBTYPE", "PROBTYPE", "JDPProbType", "(1=1)", this.valuePROBTYPE1);
  491.    }
  492.  
  493.    public boolean Form1CheckFields() {
  494.       return true;
  495.    }
  496.  
  497.    public void Form1WhereClauseMain() {
  498.    }
  499.  
  500.    public void Form1SearchResultsMain() {
  501.    }
  502.  
  503.    public void Form1Method() {
  504.    }
  505.  
  506.    public String getCallID() {
  507.       this.jaggSQL.loadJdbcSettings("JDPHelpDesk");
  508.       this.jaggSQL.setUID("");
  509.       this.jaggSQL.setPWD("");
  510.       this.jaggSQL.setMRW("1000");
  511.       this.jaggSQL.setTOUT("60");
  512.       Vector var1 = new Vector();
  513.       String var2 = "SELECT MAX(CALLID) FROM JDPHelpDesk WHERE LASTNAME = '" + this.LASTNAME1.getText() + "' ";
  514.       this.jaggSQL.execSQL(var2, var1);
  515.       byte var4 = 0;
  516.       if (var4 >= var1.size()) {
  517.          return "";
  518.       } else {
  519.          StringTokenizer var3 = new StringTokenizer((String)var1.elementAt(var4), this.jaggSQL.getSEP());
  520.          return var3.nextToken();
  521.       }
  522.    }
  523. }
  524.