?? mainframe.java~143~
字號:
jdbTextField13.setEnabled(true);
jdbTextField14.setDataSet(queryDataSet2);
jdbTextField14.setColumnName("student_sex");
jdbTextField14.setText("jdbTextField10");
jdbTextField14.setEditable(false);
jdbTextField14.setPreferredSize(new Dimension(50, 22));
jdbTextField14.setEnabled(true);
qSet_jiangli.setQuery(new com.borland.dx.sql.dataset.QueryDescriptor(database1, "SELECT student_gcheck.gcheck_id,student_gcheck.gcheck_no,student_gcheck.gcheck_name,student_gcheck.gc" +
"heck_time,student_gcheck.gcheck_title,student_gcheck.gcheck_disc " +
"FROM student.dbo.student_gcheck", null, true, Load.ALL));
column17.setColumnName("gcheck_time");
column17.setDataType(com.borland.dx.dataset.Variant.TIMESTAMP);
column17.setEditMask("yyyy-MM-dd");
column17.setSchemaName("dbo");
column17.setTableName("student_gcheck");
column17.setServerColumnName("gcheck_time");
column17.setSqlType(93);
column20.setColumnName("gcheck_time"); column20.setDataType(com.borland.dx.dataset.Variant.TIMESTAMP); column20.setEditMask("yyyy-MM-dd"); column20.setSchemaName("dbo"); column20.setTableName("student_gcheck"); column20.setServerColumnName("gcheck_time"); column20.setSqlType(93); jdbTable4.setDataSet(qSet_jiangli); column21.setColumnName("gcheck_id"); column21.setDataType(com.borland.dx.dataset.Variant.INT); column21.setRowId(true); column21.setSchemaName("dbo"); column21.setTableName("student_gcheck"); column21.setVisible(com.borland.jb.util.TriStateProperty.FALSE); column21.setServerColumnName("gcheck_id"); column21.setSqlType(4); column22.setColumnName("gcheck_no"); column22.setDataType(com.borland.dx.dataset.Variant.INT); column22.setSchemaName("dbo"); column22.setTableName("student_gcheck"); column22.setVisible(com.borland.jb.util.TriStateProperty.FALSE); column22.setServerColumnName("gcheck_no"); column22.setSqlType(4); column23.setColumnName("gcheck_name"); column23.setDataType(com.borland.dx.dataset.Variant.STRING); column23.setPrecision(10); column23.setSchemaName("dbo"); column23.setTableName("student_gcheck"); column23.setVisible(com.borland.jb.util.TriStateProperty.FALSE); column23.setServerColumnName("gcheck_name"); column23.setSqlType(1); column24.setColumnName("gcheck_title"); column24.setDataType(com.borland.dx.dataset.Variant.STRING); column24.setPrecision(50); column24.setSchemaName("dbo"); column24.setTableName("student_gcheck"); column24.setWidth(10); column24.setServerColumnName("gcheck_title"); column24.setSqlType(12); qSet_jiangli.setColumns(new Column[] {column21, column22, column23, column20, column24}); this.getContentPane().add(jTabbedPane1,
new PaneConstraints("jTabbedPane1", "jTabbedPane1",
PaneConstraints.ROOT, 1.0f));
jTabbedPane1.add(jPanel1, "個人信息管理");
jPanel1.add(jPanel5, BorderLayout.CENTER);
jPanel5.add(jdbNavToolBar1, BorderLayout.SOUTH);
jPanel5.add(jPanel6, BorderLayout.NORTH);
jPanel6.add(jPanel7, BorderLayout.NORTH);
jPanel7.add(jLabel1, null);
jPanel6.add(jPanel8, BorderLayout.CENTER);
jPanel8.add(jLabel2, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0
,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 28, 19));
jPanel8.add(jdbTextField3, new GridBagConstraints(1, 0, 2, 1, 1.0, 0.0
,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 75, 13));
jPanel8.add(jLabel4, new GridBagConstraints(3, 0, 1, 1, 0.0, 0.0
,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 31, 19));
jPanel8.add(jdbTextField4, new GridBagConstraints(4, 0, 1, 1, 1.0, 0.0
,GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 57, 13));
jPanel8.add(jLabel6, new GridBagConstraints(5, 0, 1, 1, 0.0, 0.0
,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 40, 19));
jPanel8.add(jdbTextField5, new GridBagConstraints(6, 0, 1, 1, 1.0, 0.0
,GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 57, 13));
jPanel8.add(jButton1, new GridBagConstraints(7, 0, 1, 1, 0.0, 0.0
,GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 3), 16, 10));
jPanel8.add(jLabel3, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0
,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 30, 19));
jPanel8.add(jPanel19, new GridBagConstraints(2, 1, 1, 1, 1.0, 1.0
,GridBagConstraints.CENTER, GridBagConstraints.VERTICAL, new Insets(0, 0, 0, 0), -3, 25));
jPanel8.add(jLabel5, new GridBagConstraints(3, 1, 1, 1, 0.0, 0.0
,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(0, 0, 0, 1), 30, 19));
jPanel8.add(jdbTextField7, new GridBagConstraints(4, 1, 1, 1, 1.0, 0.0
,GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 7, 13));
jPanel8.add(jLabel7, new GridBagConstraints(5, 1, 1, 1, 0.0, 0.0
,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 40, 19));
jPanel8.add(jdbTextField8, new GridBagConstraints(6, 1, 1, 1, 1.0, 0.0
,GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 57, 13));
jPanel8.add(jButton2, new GridBagConstraints(7, 1, 1, 1, 0.0, 0.0
,GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 3), 16, 10));
jPanel5.add(tableScrollPane1, BorderLayout.CENTER);
tableScrollPane1.getViewport().add(jdbTable1, null);
jTabbedPane1.add(jPanel2, "選課信息管理");
jTabbedPane1.add(jPanel3, "獎勵信息管理");
jPanel3.add(jPanel13, BorderLayout.NORTH);
jPanel13.add(jLabel14, null); jPanel13.add(jdbNavField3, null);
jPanel13.add(jLabel16, null); jPanel13.add(jdbTextField12, null);
jPanel13.add(jLabel17, null); jPanel13.add(jdbTextField13, null);
jPanel13.add(jLabel15, null);
jPanel3.add(jPanel15, BorderLayout.SOUTH);
jPanel15.add(tableScrollPane4, BorderLayout.CENTER);
tableScrollPane4.getViewport().add(jdbTable4, null);
jPanel3.add(jPanel14, BorderLayout.CENTER);
jPanel14.add(jPanel16, BorderLayout.WEST);
jPanel16.add(jLabel18, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0
,GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 17, 14));
jPanel16.add(jLabel19, new GridBagConstraints(0, 1, 1, 2, 0.0, 0.0
,GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 13, 10));
jPanel16.add(jdbTextField1, new GridBagConstraints(1, 0, 2, 1, 0.0, 0.0 ,GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 89, 2));
jPanel16.add(jdbTextField2, new GridBagConstraints(1, 2, 3, 2, 0.0, 0.0 ,GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 91, 0));
jPanel14.add(jPanel17, BorderLayout.CENTER);
jPanel17.add(jdbTextArea1, BorderLayout.CENTER);
jPanel17.add(jLabel20, BorderLayout.NORTH);
jPanel14.add(jPanel18, BorderLayout.EAST);
jPanel18.add(jButton5, BorderLayout.NORTH);
jPanel18.add(jButton6, BorderLayout.CENTER);
jTabbedPane1.add(jPanel4, "職務信息管理");
jPanel2.add(jPanel9, BorderLayout.NORTH);
jPanel9.add(jLabel8, null);
jPanel9.add(jdbNavField2, null);
jPanel9.add(jLabel9, null);
jPanel9.add(jdbTextField11, null);
jPanel9.add(jLabel10, null);
jPanel9.add(jdbTextField9, null);
jPanel9.add(jLabel11, null);
jPanel9.add(jdbTextField10, null);
jPanel2.add(jdbNavToolBar2, BorderLayout.SOUTH);
jPanel2.add(jPanel10, BorderLayout.WEST);
jPanel10.add(jLabel12, BorderLayout.NORTH);
jPanel10.add(tableScrollPane2, BorderLayout.CENTER);
tableScrollPane2.getViewport().add(jdbTable2, null);
jPanel2.add(jPanel11, BorderLayout.EAST);
jPanel11.add(jLabel13, BorderLayout.NORTH);
jPanel11.add(tableScrollPane3, BorderLayout.CENTER);
tableScrollPane3.getViewport().add(jdbTable3, null);
jPanel2.add(jPanel12, BorderLayout.CENTER);
jPanel12.add(jButton3, new XYConstraints(4, 89, -1, 31));
jPanel12.add(jButton4, new XYConstraints(2, 153, 59, 33));
jPanel19.add(jdbRadioButton1, null);
jPanel19.add(jdbRadioButton2, null);
buttonGroup1.add(jdbRadioButton2);
buttonGroup1.add(jdbRadioButton1);
jPanel7.add(jdbNavField1, null);
jPanel13.add(jdbTextField14, null);
}
void jButton1_actionPerformed(ActionEvent e) {
queryDataSet2.saveChanges();
}
void jButton3_actionPerformed(ActionEvent e) {
if ( queryDataSet2.isEmpty() ) return;
if ( queryDataSet1.isEmpty() ) return;
if (!queryDataSet4.isOpen()) queryDataSet4.open();
queryDataSet4.last();
int i = queryDataSet4.getInt("count_id");
queryDataSet4.setInt("count_id", ++i);
queryDataSet4.post();
queryDataSet4.saveChanges( queryDataSet4 );
if (! qSet_course.isOpen() ) qSet_course.open();
try {
qSet_course.insertRow(false);
qSet_course.setInt("count_id", i);
qSet_course.setInt("course_id", queryDataSet2.getInt("student_id"));
qSet_course.setString("course_name",
queryDataSet2.getString("student_name"));
qSet_course.setInt("course_no", queryDataSet1.getInt("course_code"));
qSet_course.post();
qSet_course.saveChanges(qSet_course);
}catch (Exception ex ){
qSet_course.refresh();
}
}
void jButton4_actionPerformed(ActionEvent e) {
if (! qSet_course.isOpen() ) qSet_course.open();
if ( qSet_course.isEmpty() ) return;
qSet_course.deleteRow();
qSet_course.saveChanges( qSet_course );
}
void qSet_course_filterRow(ReadRow row, RowFilterResponse response) {
if ( row.getInt("course_id" )== queryDataSet2.getInt("student_id") )
{
response.add();
}else{
response.ignore();
}
}
void queryDataSet2_masterNavigating(MasterNavigateEvent e) {
}
void jPanel2_focusGained(FocusEvent e) {
qSet_course.refilter();
}
void queryDataSet2_navigated(NavigationEvent e) {
qSet_course.refilter();
}
}
class MainFrame_jButton1_actionAdapter implements java.awt.event.ActionListener {
MainFrame adaptee;
MainFrame_jButton1_actionAdapter(MainFrame adaptee) {
this.adaptee = adaptee;
}
public void actionPerformed(ActionEvent e) {
adaptee.jButton1_actionPerformed(e);
}
}
class MainFrame_jButton3_actionAdapter implements java.awt.event.ActionListener {
MainFrame adaptee;
MainFrame_jButton3_actionAdapter(MainFrame adaptee) {
this.adaptee = adaptee;
}
public void actionPerformed(ActionEvent e) {
adaptee.jButton3_actionPerformed(e);
}
}
class MainFrame_jButton4_actionAdapter implements java.awt.event.ActionListener {
MainFrame adaptee;
MainFrame_jButton4_actionAdapter(MainFrame adaptee) {
this.adaptee = adaptee;
}
public void actionPerformed(ActionEvent e) {
adaptee.jButton4_actionPerformed(e);
}
}
class MainFrame_qSet_course_rowFilterAdapter implements com.borland.dx.dataset.RowFilterListener {
MainFrame adaptee;
MainFrame_qSet_course_rowFilterAdapter(MainFrame adaptee) {
this.adaptee = adaptee;
}
public void filterRow(ReadRow row, RowFilterResponse response) {
adaptee.qSet_course_filterRow(row, response);
}
}
class MainFrame_queryDataSet2_navigationAdapter implements com.borland.dx.dataset.NavigationListener {
MainFrame adaptee;
MainFrame_queryDataSet2_navigationAdapter(MainFrame adaptee) {
this.adaptee = adaptee;
}
public void navigated(NavigationEvent e) {
adaptee.queryDataSet2_navigated(e);
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -