Skip to content

Commit 6af7868

Browse files
committed
Cập nhật thủ tục
1 parent 29cd5af commit 6af7868

File tree

86 files changed

+1974
-849
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+1974
-849
lines changed
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
-97 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
86 Bytes
Binary file not shown.

build/classes/oracle/Main.class

3 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

build/classes/oracle/MainForm$2.class

0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

build/classes/oracle/MainForm$3.class

0 Bytes
Binary file not shown.

build/classes/oracle/MainForm$4.class

0 Bytes
Binary file not shown.

build/classes/oracle/MainForm$5.class

0 Bytes
Binary file not shown.

build/classes/oracle/MainForm$6.class

0 Bytes
Binary file not shown.

build/classes/oracle/MainForm$7.class

0 Bytes
Binary file not shown.

build/classes/oracle/MainForm$8.class

0 Bytes
Binary file not shown.

build/classes/oracle/MainForm$9.class

0 Bytes
Binary file not shown.

build/classes/oracle/MainForm.class

292 Bytes
Binary file not shown.

build/classes/oracle/MainForm.form

+8
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,14 @@
181181
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jMenuItem4ActionPerformed"/>
182182
</Events>
183183
</MenuItem>
184+
<MenuItem class="javax.swing.JMenuItem" name="jMenuItem9">
185+
<Properties>
186+
<Property name="text" type="java.lang.String" value="RMAN"/>
187+
</Properties>
188+
<Events>
189+
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jMenuItem9ActionPerformed"/>
190+
</Events>
191+
</MenuItem>
184192
</SubComponents>
185193
</Menu>
186194
</SubComponents>
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
204 Bytes
Binary file not shown.
4 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
168 Bytes
Binary file not shown.

build/classes/oracle/RoleManager.form

+4-4
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@
115115
<EmptySpace max="-2" attributes="0"/>
116116
<Component id="btnGrant" min="-2" max="-2" attributes="0"/>
117117
<EmptySpace type="separate" max="-2" attributes="0"/>
118-
<Component id="jButton1" min="-2" max="-2" attributes="0"/>
118+
<Component id="btnRevokeAll" min="-2" max="-2" attributes="0"/>
119119
</Group>
120120
<Group type="102" alignment="0" attributes="0">
121121
<EmptySpace min="-2" pref="20" max="-2" attributes="0"/>
@@ -167,7 +167,7 @@
167167
<EmptySpace pref="95" max="32767" attributes="0"/>
168168
<Group type="103" groupAlignment="3" attributes="0">
169169
<Component id="btnGrant" alignment="3" min="-2" max="-2" attributes="0"/>
170-
<Component id="jButton1" alignment="3" min="-2" max="-2" attributes="0"/>
170+
<Component id="btnRevokeAll" alignment="3" min="-2" max="-2" attributes="0"/>
171171
</Group>
172172
<EmptySpace min="-2" pref="14" max="-2" attributes="0"/>
173173
</Group>
@@ -223,12 +223,12 @@
223223
<Property name="text" type="java.lang.String" value="Grant"/>
224224
</Properties>
225225
</Component>
226-
<Component class="javax.swing.JButton" name="jButton1">
226+
<Component class="javax.swing.JButton" name="btnRevokeAll">
227227
<Properties>
228228
<Property name="text" type="java.lang.String" value="Thu h&#x1ed3;i t&#x1ea5;t c&#x1ea3;"/>
229229
</Properties>
230230
<Events>
231-
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton1ActionPerformed"/>
231+
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnRevokeAllActionPerformed"/>
232232
</Events>
233233
</Component>
234234
</SubComponents>
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
-4 Bytes
Binary file not shown.
-225 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
-776 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
-2.27 KB
Binary file not shown.

build/classes/oracle/UserManager.form

+63-108
Large diffs are not rendered by default.

login.dat

-2 Bytes
Binary file not shown.

nbproject/private/private.xml

+2-9
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,11 @@
2222
</editor-bookmarks>
2323
<open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2">
2424
<group>
25-
<file>file:/D:/GitHub/Oracle_Demo_Java/src/oracle/model/ChucVuDB.java</file>
26-
<file>file:/D:/GitHub/Oracle_Demo_Java/src/oracle/model/ChucVuModel.java</file>
2725
<file>file:/D:/GitHub/Oracle_Demo_Java/src/oracle/MainForm.java</file>
28-
<file>file:/D:/GitHub/Oracle_Demo_Java/src/oracle/model/SanPhamDB.java</file>
29-
<file>file:/D:/GitHub/Oracle_Demo_Java/src/oracle/Main.java</file>
30-
<file>file:/D:/GitHub/Oracle_Demo_Java/src/oracle/model/NhanVienDB.java</file>
31-
<file>file:/D:/GitHub/Oracle_Demo_Java/src/oracle/AuditView.java</file>
32-
<file>file:/D:/GitHub/Oracle_Demo_Java/src/oracle/model/DB.java</file>
3326
<file>file:/D:/GitHub/Oracle_Demo_Java/src/oracle/MainFormUser.java</file>
34-
<file>file:/D:/GitHub/Oracle_Demo_Java/src/oracle/model/DonHangDB.java</file>
27+
<file>file:/D:/GitHub/Oracle_Demo_Java/src/oracle/EmployeeManager.java</file>
28+
<file>file:/D:/GitHub/Oracle_Demo_Java/src/oracle/Main.java</file>
3529
<file>file:/D:/GitHub/Oracle_Demo_Java/src/oracle/Tablespaceview.java</file>
36-
<file>file:/D:/GitHub/Oracle_Demo_Java/src/oracle/Session.java</file>
3730
<file>file:/D:/GitHub/Oracle_Demo_Java/src/oracle/UserManager.java</file>
3831
</group>
3932
</open-files>

procedure.sql

-159
This file was deleted.

src/oracle/ChangePassword.java

+6-5
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
*/
55
package oracle;
66

7+
import java.sql.PreparedStatement;
78
import java.sql.ResultSet;
89
import java.sql.SQLException;
910
import java.sql.Statement;
@@ -127,11 +128,11 @@ private void btnChangePwActionPerformed(java.awt.event.ActionEvent evt) {//GEN-F
127128
if(password!=null)
128129
{
129130
try {
130-
oracle.openConnection();
131-
Statement stmt;
132-
stmt = oracle.conn.createStatement();
133-
String sql = "ALTER USER "+username+" IDENTIFIED BY "+password+"";
134-
ResultSet rset = stmt.executeQuery(sql);
131+
String sql = "BEGIN change_password_user(?,?);END;";
132+
PreparedStatement pstmt = oracle.conn.prepareStatement(sql);
133+
pstmt.setString(1, username);
134+
pstmt.setString(2, password);
135+
pstmt.executeUpdate();
135136
JOptionPane.showMessageDialog(null,"Đổi mật khẩu thành công!");
136137
} catch (SQLException ex) {
137138
Logger.getLogger(Session.class.getName()).log(Level.SEVERE, null, ex);

src/oracle/EmployeeManager.java

+21-15
Original file line numberDiff line numberDiff line change
@@ -276,16 +276,19 @@ private void btnThemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST
276276
}
277277
else{
278278
try {
279-
oracle.openConnection();
280279

281-
String sql = "INSERT INTO admin.nhanvien VALUES("+id+",'"+tennv+"',"+luong+","+chucvu+")";
282-
Statement st = oracle.conn.createStatement();
283-
284-
st.executeUpdate(sql);
280+
281+
String sql = "begin admin.Them_NhanVien(?,?,?,?);end;";
282+
PreparedStatement pstmt = oracle.conn.prepareStatement(sql);
283+
pstmt.setString(1, id);
284+
pstmt.setString(2, tennv);
285+
pstmt.setString(3, luong);
286+
pstmt.setString(4, chucvu);
287+
ResultSet rs = pstmt.executeQuery();
285288
JOptionPane.showMessageDialog(null, "Thêm thành công");
286289
RemoveTableItem(jTable1);
287290
loadData();
288-
oracle.closeConnection();
291+
289292

290293
} catch (SQLException ex) {
291294
Logger.getLogger(EmployeeManager.class.getName()).log(Level.SEVERE, null, ex);
@@ -302,11 +305,11 @@ private void btnXoaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:
302305
String id=txtID.getText().trim();
303306
try
304307
{
305-
oracle.openConnection();
306-
307-
String sql = "DELETE FROM ADMIN.NHANVIEN WHERE MANV ='"+id+"'";
308-
Statement st = oracle.conn.createStatement();
309-
st.executeUpdate(sql);
308+
String sql = "begin admin.Xoa_NhanVien(?);end;";
309+
PreparedStatement pstmt = oracle.conn.prepareStatement(sql);
310+
pstmt.setString(1, id);
311+
ResultSet rs = pstmt.executeQuery();
312+
310313
JOptionPane.showMessageDialog(null, "Xóa thành công");
311314
RemoveTableItem(jTable1);
312315
loadData();
@@ -337,10 +340,13 @@ private void btnSuaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:
337340
JOptionPane.showMessageDialog(null, "Vui lòng nhập đầy đủ thông tin");
338341
} else {
339342
try {
340-
oracle.openConnection();
341-
String sql = "UPDATE ADMIN.NHANVIEN SET TENNV='" + tennv + "',LUONGNV=" + luong + ",MACHUCVU='" + chucvu + "' WHERE MANV='" + id + "'";
342-
Statement st = oracle.conn.createStatement();
343-
st.executeUpdate(sql);
343+
String sql = "begin admin.Capnhat_NhanVien(?,?,?,?);end;";
344+
PreparedStatement pstmt = oracle.conn.prepareStatement(sql);
345+
pstmt.setString(1, id);
346+
pstmt.setString(2, tennv);
347+
pstmt.setString(3, luong);
348+
pstmt.setString(4, chucvu);
349+
ResultSet rs = pstmt.executeQuery();
344350
JOptionPane.showMessageDialog(null, "Sửa thành công");
345351
RemoveTableItem(jTable1);
346352
loadData();

src/oracle/Main.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ public static void main(String args[]) {
337337
*/
338338
try {
339339
for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
340-
if ("Nimbus".equals(info.getName())) {
340+
if ("Macintosh".equals(info.getName())) {
341341
javax.swing.UIManager.setLookAndFeel(info.getClassName());
342342
break;
343343
}

src/oracle/MainForm.form

+8
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,14 @@
181181
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jMenuItem4ActionPerformed"/>
182182
</Events>
183183
</MenuItem>
184+
<MenuItem class="javax.swing.JMenuItem" name="jMenuItem9">
185+
<Properties>
186+
<Property name="text" type="java.lang.String" value="RMAN"/>
187+
</Properties>
188+
<Events>
189+
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jMenuItem9ActionPerformed"/>
190+
</Events>
191+
</MenuItem>
184192
</SubComponents>
185193
</Menu>
186194
</SubComponents>

src/oracle/MainForm.java

+15
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@ private void initComponents() {
168168
jMenu5 = new javax.swing.JMenu();
169169
jMenuItem3 = new javax.swing.JMenuItem();
170170
jMenuItem4 = new javax.swing.JMenuItem();
171+
jMenuItem9 = new javax.swing.JMenuItem();
171172

172173
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
173174
setSize(new java.awt.Dimension(1005, 828));
@@ -360,6 +361,14 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
360361
});
361362
jMenu5.add(jMenuItem4);
362363

364+
jMenuItem9.setText("RMAN");
365+
jMenuItem9.addActionListener(new java.awt.event.ActionListener() {
366+
public void actionPerformed(java.awt.event.ActionEvent evt) {
367+
jMenuItem9ActionPerformed(evt);
368+
}
369+
});
370+
jMenu5.add(jMenuItem9);
371+
363372
jMenuBar1.add(jMenu5);
364373

365374
setJMenuBar(jMenuBar1);
@@ -536,6 +545,11 @@ private void jMenuItem8ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FI
536545
new PermissionGroup().setVisible(true);
537546
}//GEN-LAST:event_jMenuItem8ActionPerformed
538547

548+
private void jMenuItem9ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem9ActionPerformed
549+
// TODO add your handling code here:
550+
new RMAN().setVisible(true);
551+
}//GEN-LAST:event_jMenuItem9ActionPerformed
552+
539553

540554

541555
private void loadInfoUser(){
@@ -622,6 +636,7 @@ public void run() {
622636
private javax.swing.JMenuItem jMenuItem6;
623637
private javax.swing.JMenuItem jMenuItem7;
624638
private javax.swing.JMenuItem jMenuItem8;
639+
private javax.swing.JMenuItem jMenuItem9;
625640
private javax.swing.JMenuItem menuItemChangePw;
626641
private javax.swing.JMenuItem menuItemProfiles;
627642
private javax.swing.JMenuItem menuItemRole;

src/oracle/PermissionGroup.form

-7
Original file line numberDiff line numberDiff line change
@@ -148,13 +148,6 @@
148148
</Layout>
149149
<SubComponents>
150150
<Component class="javax.swing.JComboBox" name="cbbUsername">
151-
<Properties>
152-
<Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor">
153-
<StringArray count="1">
154-
<StringItem index="0" value=" "/>
155-
</StringArray>
156-
</Property>
157-
</Properties>
158151
<Events>
159152
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="cbbUsernameActionPerformed"/>
160153
</Events>

0 commit comments

Comments
 (0)