private void loadInformation() { try { global.ActivityDetail = global.con.createStatement(); global.ActivityDetailRS = global.ActivityDetail.executeQuery( "SELECT * FROM activity WHERE ActivityID = " + activityID); global.ActivityDetailRS.first(); descriptionID = global.ActivityDetailRS.getString("Description"); DateTextBox.setText( global.mmddyyyyhmma.format(global.ActivityDetailRS.getTimestamp("DateTime"))); EnteredByTextBox.setText(global.ActivityDetailRS.getString("EnteredBy")); DescriptionTextBox.setText(loadDescriptionFormatting(descriptionID)); CompletedByTextBox.setText(global.ActivityDetailRS.getString("CompletedBy")); HoursTextBox.setText(global.ActivityDetailRS.getString("Hours")); BatesNumberTextBox.setText(global.ActivityDetailRS.getString("BatesNumber")); LocationTextBox.setText(global.ActivityDetailRS.getString("Location")); if (global.ActivityDetailRS.getString("Billable").equals("Y")) { global.billingInfo = global.con.createStatement(); global.billingInfoRS = global.billingInfo.executeQuery( "SELECT billsent FROM billing " + "WHERE ActivityID = " + activityID); global.billingInfoRS.first(); if (global.billingInfoRS.getDate("BillSent") == null) { InvoiceDateTextBox.setText("Not Yet Invoiced"); } else { InvoiceDateTextBox.setText( global.mmddyyyy.format(global.billingInfoRS.getDate("BillSent"))); UpdateButton.setEnabled(false); LocationTextBox.setEnabled(false); LocationTextBox.setBackground(new java.awt.Color(238, 238, 238)); LocationTextBox.setDisabledTextColor(new java.awt.Color(0, 0, 0)); DescriptionTextBox.setEnabled(false); DescriptionTextBox.setBackground(new java.awt.Color(238, 238, 238)); DescriptionTextBox.setDisabledTextColor(new java.awt.Color(0, 0, 0)); } } else { InvoiceDateTextBox.setText("Not Invoiced"); } if (global.ActivityDetailRS.getString("Billable").equals("Y")) { BillableCheckBox.setSelected(true); } else { BillableCheckBox.setSelected(false); } if (global.ActivityDetailRS.getString("File").equals("")) { ViewFileButton.setVisible(false); } else { ViewFileButton.setVisible(true); } if (descriptionID.startsWith("Matter Created") || descriptionID.startsWith("Initial Counsel")) { UpdateButton.setEnabled(false); LocationTextBox.setEnabled(false); LocationTextBox.setBackground(new java.awt.Color(238, 238, 238)); LocationTextBox.setDisabledTextColor(new java.awt.Color(0, 0, 0)); DescriptionTextBox.setEnabled(false); DescriptionTextBox.setBackground(new java.awt.Color(238, 238, 238)); DescriptionTextBox.setDisabledTextColor(new java.awt.Color(0, 0, 0)); } } catch (SQLException ex) { StringWriter error = new StringWriter(); ex.printStackTrace(new PrintWriter(error)); SystemCrashDialog crash = new SystemCrashDialog( global.root, true, global, global.root.getHeaderRootPanel1().getClientComboBox().getSelectedItem().toString(), global.root.getHeaderRootPanel1().getMatterComboBox().getSelectedItem().toString(), "Err0221", error.toString()); } }
/** * This method is called from within the constructor to initialize the form. WARNING: Do NOT * modify this code. The content of this method is always regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); jLabel4 = new javax.swing.JLabel(); jLabel6 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); ViewFileButton = new javax.swing.JButton(); CancelButton = new javax.swing.JButton(); UpdateButton = new javax.swing.JButton(); EnteredByTextBox = new javax.swing.JTextField(); CompletedByTextBox = new javax.swing.JTextField(); HoursTextBox = new javax.swing.JTextField(); BillableCheckBox = new javax.swing.JCheckBox(); jLabel5 = new javax.swing.JLabel(); DateTextBox = new javax.swing.JTextField(); jScrollPane1 = new javax.swing.JScrollPane(); DescriptionTextBox = new javax.swing.JTextArea(); InvoiceDateTextBox = new javax.swing.JTextField(); jLabel7 = new javax.swing.JLabel(); CharacterLimit = new javax.swing.JLabel(); BatesNumberTextBox = new javax.swing.JTextField(); jLabel8 = new javax.swing.JLabel(); LocationTextBox = new javax.swing.JTextField(); jLabel9 = new javax.swing.JLabel(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); setTitle("Detailed Case Activity"); setResizable(false); jLabel1.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jLabel1.setText("Detailed Case Activity Information"); jLabel2.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); jLabel2.setText("Date:"); jLabel4.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); jLabel4.setText("Desciption:"); jLabel6.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); jLabel6.setText("Completed By:"); jLabel3.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); jLabel3.setText("Hours:"); ViewFileButton.setText("View File"); ViewFileButton.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { ViewFileButtonActionPerformed(evt); } }); CancelButton.setText("Cancel"); CancelButton.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { CancelButtonActionPerformed(evt); } }); UpdateButton.setText("Update Description"); UpdateButton.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { UpdateButtonActionPerformed(evt); } }); EnteredByTextBox.setEditable(false); EnteredByTextBox.setBackground(new java.awt.Color(238, 238, 238)); EnteredByTextBox.setDisabledTextColor(new java.awt.Color(0, 0, 0)); EnteredByTextBox.setEnabled(false); CompletedByTextBox.setBackground(new java.awt.Color(238, 238, 238)); CompletedByTextBox.setDisabledTextColor(new java.awt.Color(0, 0, 0)); CompletedByTextBox.setDoubleBuffered(true); CompletedByTextBox.setEnabled(false); CompletedByTextBox.setFocusable(false); CompletedByTextBox.setRequestFocusEnabled(false); HoursTextBox.setBackground(new java.awt.Color(238, 238, 238)); HoursTextBox.setDisabledTextColor(new java.awt.Color(0, 0, 0)); HoursTextBox.setEnabled(false); HoursTextBox.setRequestFocusEnabled(false); BillableCheckBox.setText("Billable"); BillableCheckBox.setEnabled(false); jLabel5.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); jLabel5.setText("Entered By:"); DateTextBox.setEditable(false); DateTextBox.setBackground(new java.awt.Color(238, 238, 238)); DateTextBox.setDisabledTextColor(new java.awt.Color(0, 0, 0)); DateTextBox.setEnabled(false); DescriptionTextBox.setColumns(20); DescriptionTextBox.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N DescriptionTextBox.setLineWrap(true); DescriptionTextBox.setRows(5); jScrollPane1.setViewportView(DescriptionTextBox); InvoiceDateTextBox.setBackground(new java.awt.Color(238, 238, 238)); InvoiceDateTextBox.setDisabledTextColor(new java.awt.Color(0, 0, 0)); InvoiceDateTextBox.setDoubleBuffered(true); InvoiceDateTextBox.setEnabled(false); InvoiceDateTextBox.setFocusable(false); InvoiceDateTextBox.setRequestFocusEnabled(false); jLabel7.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); jLabel7.setText("Invoiced Date:"); CharacterLimit.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING); CharacterLimit.setText("2000/2000"); BatesNumberTextBox.setBackground(new java.awt.Color(238, 238, 238)); BatesNumberTextBox.setDisabledTextColor(new java.awt.Color(0, 0, 0)); BatesNumberTextBox.setDoubleBuffered(true); BatesNumberTextBox.setEnabled(false); BatesNumberTextBox.setFocusable(false); BatesNumberTextBox.setRequestFocusEnabled(false); jLabel8.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); jLabel8.setText("Bates Number:"); LocationTextBox.setDisabledTextColor(new java.awt.Color(0, 0, 0)); LocationTextBox.setDoubleBuffered(true); jLabel9.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); jLabel9.setText("Location:"); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( layout .createSequentialGroup() .addContainerGap() .addGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( javax.swing.GroupLayout.Alignment.TRAILING, layout .createSequentialGroup() .addComponent( jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 142, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent( HoursTextBox, javax.swing.GroupLayout.PREFERRED_SIZE, 69, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(BillableCheckBox) .addGap(36, 36, 36) .addComponent( ViewFileButton, javax.swing.GroupLayout.PREFERRED_SIZE, 145, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent( jLabel1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent( CancelButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent( UpdateButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup( layout .createSequentialGroup() .addComponent( jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(DateTextBox)) .addComponent( CharacterLimit, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup( layout .createSequentialGroup() .addGroup( layout .createParallelGroup( javax.swing.GroupLayout.Alignment.TRAILING, false) .addComponent( jLabel9, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent( jLabel8, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent( jLabel7, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent( jLabel4, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent( jLabel5, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent( jLabel6, javax.swing.GroupLayout.DEFAULT_SIZE, 80, Short.MAX_VALUE)) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup( layout .createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent( CompletedByTextBox, javax.swing.GroupLayout.DEFAULT_SIZE, 375, Short.MAX_VALUE) .addComponent(EnteredByTextBox) .addComponent(jScrollPane1) .addComponent(InvoiceDateTextBox) .addComponent(BatesNumberTextBox) .addComponent(LocationTextBox)))) .addContainerGap())); layout.setVerticalGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( layout .createSequentialGroup() .addContainerGap() .addComponent(jLabel1) .addGap(18, 18, 18) .addGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel2) .addComponent( DateTextBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel5) .addComponent( EnteredByTextBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent( CompletedByTextBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel6)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent( InvoiceDateTextBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel7)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent( BatesNumberTextBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel8)) .addGap(24, 24, 24) .addGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent( LocationTextBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel9)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel4) .addComponent( jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(CharacterLimit) .addGap(27, 27, 27) .addGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel3) .addComponent( HoursTextBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(BillableCheckBox) .addComponent(ViewFileButton)) .addGap(37, 37, 37) .addComponent(UpdateButton) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(CancelButton) .addContainerGap())); layout.linkSize( javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] { BillableCheckBox, CompletedByTextBox, DateTextBox, EnteredByTextBox, HoursTextBox, jLabel2, jLabel3, jLabel4, jLabel5, jLabel6 }); layout.linkSize( javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {InvoiceDateTextBox, jLabel7}); pack(); } // </editor-fold>//GEN-END:initComponents