⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 maindesk.java~44~

📁 学生信息管理系统(JBuilder x 开发,采用RSA 512位公钥加密,私钥用于找回密码,2006-4-5)
💻 JAVA~44~
📖 第 1 页 / 共 3 页
字号:
  }
  void cancel() {
          dispose();
  }

  void jButton2_actionPerformed(ActionEvent e) {
    登录 登录1=new 登录();
        登录1.setTitle("登录");
        登录1.setBounds(50,50,497,362);
        登录1.show();
        cancel();

  }
////////////////数据备份////////////////////////////////////////
  void jButton7_actionPerformed(ActionEvent e) {
    FileInputStream in1;
        FileOutputStream out1;
        try{
          in1=new FileInputStream("学生信息管理.mdb");
          out1=new FileOutputStream("学生信息管理备份.mdb");
          byte buf[]=new byte[in1.available()];
          in1.read(buf);
          out1.write(buf);
          in1.close();
          out1.close();
          JOptionPane.showMessageDialog(this,"数据库已备份","消息",JOptionPane.INFORMATION_MESSAGE);
      //  System.out.print("ok");
        }catch(IOException e1){System.out.println("error!");}

  }



  void jButton1_actionPerformed(ActionEvent e) {
    if(Integer.parseInt(right)==2){
    增加用户 用户1=new 增加用户();
           用户1.setTitle("增加用户");
           用户1.setBounds(50,50,400,350);
           用户1.show();

    }
  }

  void jButton1_mousePressed(MouseEvent e) {

  }

  void jButton3_mouseClicked(MouseEvent e) {
    ///////////////////增加日志///////////////////
             try{
       try {
             Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); // 实例化JDBC-ODBC桥的驱动
       }
       catch (ClassNotFoundException ex1) {
       }

       String url = "jdbc:odbc:日志管理";                 // 设置连接字符串
       connection = DriverManager.getConnection(url);      // 连接数据库
       statement = connection.createStatement();           // 创建Statement接口对象
       java.util.Date now=new java.util.Date();
       String sql1 = "insert into 日志管理 (类型,用户,日期) values ('退出',";
       sql1+="'"+operator+"',";
       sql1+="'"+now+"')";
       statement.executeUpdate(sql1);          // 执行增加新的数据记录语句
     }catch(SQLException ex){;}

System.exit(1);
  }

  void jMenuItem1_actionPerformed(ActionEvent e) {
    if(Integer.parseInt(right)==2){
     增加用户 用户1=new 增加用户();
            用户1.setTitle("增加用户");
            用户1.setBounds(50,50,400,350);
            用户1.show();
     }
  }

  void jMenuItem5_actionPerformed(ActionEvent e) {
            登录 登录1=new 登录();
            登录1.setTitle("登录");
            登录1.setBounds(50,50,497,362);
            登录1.show();
            cancel();

  }

  void jButton4_actionPerformed(ActionEvent e) {
    if(Integer.parseInt(right)!=0){
    浏览档案 浏览档案1=new 浏览档案(operator,password,right,mode);
            浏览档案1.setTitle(" 档案管理");
            浏览档案1.setBounds(50,50,700,540);
            浏览档案1.show();
    }
  }

  void jMenuItem6_actionPerformed(ActionEvent e) {
    if(Integer.parseInt(right)!=0){
    浏览档案 浏览档案1=new 浏览档案(operator,password,right,mode);
           浏览档案1.setTitle(" 档案管理");
           浏览档案1.setBounds(50,50,700,540);
           浏览档案1.show();
    }

  }

  void jMenuItem7_actionPerformed(ActionEvent e) {
    if(Integer.parseInt(right)!=0){
    增加档案 增加档案1=new 增加档案();
                    增加档案1.setTitle(" 增加档案");
                    增加档案1.setBounds(50,50,640,480);
                    增加档案1.show();
    }
  }

  void jMenuItem10_actionPerformed(ActionEvent e) {
    if(Integer.parseInt(right)==2){
    浏览课程 浏览课程1=new 浏览课程();
                         浏览课程1.setTitle("课程管理");
                         浏览课程1.setBounds(50,50,640,480);
                         浏览课程1.show();
    }
  }

  void jMenuItem11_actionPerformed(ActionEvent e) {
    if(Integer.parseInt(right)==2){
    浏览课程 浏览课程1=new 浏览课程();
                        浏览课程1.setTitle("课程管理");
                      浏览课程1.setBounds(50,50,640,480);
                        浏览课程1.show();
    }

  }

  void jMenuItem13_actionPerformed(ActionEvent e) {
    浏览成绩 浏览成绩1=new 浏览成绩(operator,password,right,mode);
    浏览成绩1.setBounds(50,50,640,480);
    浏览成绩1.setTitle("浏览成绩");
    浏览成绩1.show();
  }

  void jMenuItem14_actionPerformed(ActionEvent e) {
    浏览成绩 浏览成绩1=new 浏览成绩(operator,password,right,mode);
        浏览成绩1.setBounds(50,50,640,480);
        浏览成绩1.setTitle("浏览成绩");
        浏览成绩1.show();

  }

  void jMenuItem12_actionPerformed(ActionEvent e) {
   if(Integer.parseInt(right)!=0){
       增加成绩 增加成绩1 = new 增加成绩();
    增加成绩1.setTitle("增加成绩");
    增加成绩1.setBounds(200, 200, 640, 480);
    增加成绩1.show();
   }
  }

  void jMenuItem15_actionPerformed(ActionEvent e) {
    浏览成绩 浏览成绩1=new 浏览成绩(operator,password,right,mode);
        浏览成绩1.setBounds(50,50,640,480);
        浏览成绩1.setTitle("浏览成绩");
        浏览成绩1.show();

  }

  void jMenuItem20_actionPerformed(ActionEvent e) {
   if(Integer.parseInt(right)==2){
    浏览模块 浏览模块1=new 浏览模块();
            浏览模块1.setBounds(50,50,640,480);
            浏览模块1.setTitle("浏览模块");
            浏览模块1.show();
   }
  }

  void jMenuItem17_actionPerformed(ActionEvent e) {
    if(Integer.parseInt(right)==2){
    浏览模块 浏览模块1=new 浏览模块();
                浏览模块1.setBounds(50,50,640,480);
                浏览模块1.setTitle("浏览模块");
                浏览模块1.show();
    }
  }

  void jMenuItem18_actionPerformed(ActionEvent e) {
    if(Integer.parseInt(right)==2){
    浏览模块 浏览模块1=new 浏览模块();
                浏览模块1.setBounds(50,50,640,480);
                浏览模块1.setTitle("浏览模块");
                浏览模块1.show();
    }
  }

  void jMenuItem19_actionPerformed(ActionEvent e) {
    if(Integer.parseInt(right)==2){
    浏览模块 浏览模块1=new 浏览模块();
                浏览模块1.setBounds(50,50,640,480);
                浏览模块1.setTitle("浏览模块");
                浏览模块1.show();
    }
  }

  void jButton5_actionPerformed(ActionEvent e) {
    浏览成绩 浏览成绩1=new 浏览成绩(operator,password,right,mode);
            浏览成绩1.setBounds(50,50,640,480);
            浏览成绩1.setTitle("浏览成绩");
            浏览成绩1.show();

  }

  void jMenuItem33_actionPerformed(ActionEvent e) {
   关于 关于1 = new 关于();
       关于1.setTitle("关于");
       关于1.setBounds(50, 50,497, 362);
       关于1.show();

  }

  void jButton8_actionPerformed(ActionEvent e) {
    关于 关于1 = new 关于();
        关于1.setTitle("关于");
        关于1.setBounds(50, 50,497, 362);
        关于1.show();
  }

  void jMenuItem30_actionPerformed(ActionEvent e) {
   if(Integer.parseInt(right)==2){
     浏览用户 浏览用户1 = new 浏览用户();
     浏览用户1.setBounds(50, 50, 640, 480);
     浏览用户1.setTitle("浏览用户");
     浏览用户1.show();
   }
  }

  void jButton3_actionPerformed(ActionEvent e) {

  }
  void jMenuItem24_actionPerformed(ActionEvent e) {
       if(Integer.parseInt(right)==2){
         浏览日志 浏览日志1=new 浏览日志();
                浏览日志1.setBounds(50,50,640,480);
                浏览日志1.setTitle("浏览日志");
                浏览日志1.show();
      }
  }
  void jButton6_actionPerformed(ActionEvent e) {
         if(Integer.parseInt(right)==2){
           浏览日志 浏览日志1=new 浏览日志();
                  浏览日志1.setBounds(50,50,640,480);
                  浏览日志1.setTitle("浏览日志");
                  浏览日志1.show();

         }
  }

  void jMenuItem21_actionPerformed(ActionEvent e) {
     if(Integer.parseInt(right)!=0){
    违纪管理 违纪管理1=new 违纪管理();
                      违纪管理1.setBounds(50,50,640,480);
                      违纪管理1.setTitle("违纪管理");
                      违纪管理1.show();
     }
  }

  void jMenuItem34_actionPerformed(ActionEvent e) {
     if(Integer.parseInt(right)!=0){
    获奖管理 获奖管理1=new 获奖管理(operator,password,right,mode);
                          获奖管理1.setBounds(50,50,640,480);
                          获奖管理1.setTitle("获奖管理");
                          获奖管理1.show();
     }
  }

  void jMenuItem2_actionPerformed(ActionEvent e) {
     if(Integer.parseInt(right)==2){
    批量增加用户 批量增加用户1=new 批量增加用户();
                              批量增加用户1.setBounds(50,50,640,480);
                              批量增加用户1.setTitle("批量增加用户");
                              批量增加用户1.show();
     }
  }

  void jMenuItem3_actionPerformed(ActionEvent e) {
    if(Integer.parseInt(right)==2){
      批量增加用户 批量增加用户1=new 批量增加用户();
                                 批量增加用户1.setBounds(50,50,640,480);
                                 批量增加用户1.setTitle("批量增加用户");
                                 批量增加用户1.show();
    }
  }
////////////////数据备份////////////////////////////////////////
  void jMenuItem27_actionPerformed(ActionEvent e) {
    FileInputStream in1;
    FileOutputStream out1;
    try{
      in1=new FileInputStream("学生信息管理.mdb");
      out1=new FileOutputStream("学生信息管理备份.mdb");
      byte buf[]=new byte[in1.available()];
      in1.read(buf);
      out1.write(buf);
      in1.close();
      out1.close();
      JOptionPane.showMessageDialog(this,"数据库已备份","消息",JOptionPane.INFORMATION_MESSAGE);
    }catch(IOException e1){System.out.println("error!");}



  }
////////////////数据库还原///////////////
  void jMenuItem28_actionPerformed(ActionEvent e) {
    FileInputStream in1;
       FileOutputStream out1;
       try{
          in1=new FileInputStream("学生信息管理备份.mdb");
         out1=new FileOutputStream("学生信息管理.mdb");

         byte buf[]=new byte[in1.available()];
         in1.read(buf);
         out1.write(buf);
         in1.close();
         out1.close();
         JOptionPane.showMessageDialog(this,"数据库已还原","消息",JOptionPane.INFORMATION_MESSAGE);
       }catch(IOException e1){System.out.println("error!");}

  }

  void jMenuItem26_actionPerformed(ActionEvent e) {
    FileInputStream in1;
       FileOutputStream out1;
       try{
         in1=new FileInputStream("日志管理.mdb");
         out1=new FileOutputStream("日志保存.mdb");
         byte buf[]=new byte[in1.available()];
         in1.read(buf);
         out1.write(buf);
         in1.close();
         out1.close();
         JOptionPane.showMessageDialog(this,"日志已保存","消息",JOptionPane.INFORMATION_MESSAGE);
       }catch(IOException e1){System.out.println("error!");}



  }

  void jMenuItem4_actionPerformed(ActionEvent e) {
    更改密码 更改密码1=new 更改密码(operator,password,right);
                             更改密码1.setBounds(50,50,640,480);
                             更改密码1.setTitle("更改密码");
                             更改密码1.show();

  }

  void jMenuItem9_actionPerformed(ActionEvent e) {
    浏览档案 浏览档案1=new 浏览档案(operator,password,right,mode);
               浏览档案1.setTitle(" 档案管理");
               浏览档案1.setBounds(50,50,700,540);
               浏览档案1.show();
  }

  }

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -