亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? customermanageframe.java

?? java進(jìn)銷存信息管理系統(tǒng),實(shí)現(xiàn)了倉庫產(chǎn)品價格人員報表等功能
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
        tmpBtn = (JButton)components[i];
        tmpBtn.addActionListener(this);
      }
    }
  }
  //退出方法
  public void exit(){
    //隱藏窗口
    this.setVisible(false);
    //清空數(shù)組的內(nèi)容
    customer = new String[0][17];
    //清空列表框的內(nèi)容
    listData1.clear();
    //取得面板上的所有控件
    Component[] components = contentPane.getComponents();
    //創(chuàng)建臨時文本框控件
    JTextField tmpTextField = new JTextField();
    for(int i = 0; i < components.length; i++){
      if(components[i].getClass().getName().equals("javax.swing.JTextField")){
        tmpTextField = (JTextField)components[i];
        //清空編輯框的內(nèi)容
        tmpTextField.setText("");
      }
    }
  }
  //顯示查詢客戶的方法
  public void showSearchCustomer(){
    listData1.clear();
    //為客戶列表框加入客戶數(shù)據(jù)
    for(int i = 0; i < customer.length; i++){
      listData1.addElement(customer[i][0]);
    }
  }
  //顯示單個客戶的方法
  public void showCustomer(){
    //取得當(dāng)前選擇項(xiàng)的位置
    int selectedIndex = jList1.getSelectedIndex();
    //當(dāng)列表框不處于選擇狀態(tài),不顯示數(shù)據(jù)
    if(selectedIndex == -1){
       return;
    }
    //顯示客戶的數(shù)據(jù)
    jTextField1.setText(customer[selectedIndex][0]);
    jTextField2.setText(customer[selectedIndex][1]);
    jTextField3.setText(customer[selectedIndex][2]);
    jTextField4.setText(customer[selectedIndex][3]);
    jTextField5.setText(customer[selectedIndex][4]);
    jTextField6.setText(customer[selectedIndex][5]);
    jTextField7.setText(customer[selectedIndex][6]);
    jTextField8.setText(customer[selectedIndex][7]);
    jTextField9.setText(customer[selectedIndex][8]);
    jTextField10.setText(customer[selectedIndex][9]);
    jTextField11.setText(customer[selectedIndex][10]);
    jTextField12.setText(customer[selectedIndex][11]);
    jTextField13.setText(customer[selectedIndex][12]);
    jTextField14.setText(customer[selectedIndex][13]);
    jTextField15.setText(customer[selectedIndex][14]);
    jTextArea1.setText(customer[selectedIndex][16]);
  }
  //清空單個客戶顯示的方法
  public void clearCustomer(){
    jTextField1.setText("");
    jTextField2.setText("");
    jTextField3.setText("");
    jTextField4.setText("");
    jTextField5.setText("");
    jTextField6.setText("");
    jTextField7.setText("");
    jTextField8.setText("");
    jTextField9.setText("");
    jTextField10.setText("");
    jTextField11.setText("");
    jTextField12.setText("");
    jTextField13.setText("");
    jTextField14.setText("");
    jTextField15.setText("");
    jTextArea1.setText("");
  }
  //設(shè)置用戶的方法
  public void setUser(User user) {
    this.user = user;
  }
  protected void processWindowEvent(WindowEvent e) {
    if (e.getID() == WindowEvent.WINDOW_CLOSING) {
      exit();
    }
  }
  //檢查按鈕的狀態(tài)
  public void checkBtn(boolean isManipulated){
    if(isManipulated){
      jButton2.setEnabled(false);
      jButton3.setEnabled(false);
      jButton4.setEnabled(false);
      jButton5.setEnabled(true);
      jButton6.setEnabled(true);
    }else{
      jButton2.setEnabled(true);
      jButton3.setEnabled(true);
      jButton4.setEnabled(true);
      jButton5.setEnabled(false);
      jButton6.setEnabled(false);
    }
  }
  //列表1的選擇事件
  void jList1_valueChanged(ListSelectionEvent e) {
    if(listData1.size() > 0){
      this.showCustomer();
    }else{
      this.clearCustomer();
    }
  }
  //查詢方法
  public void search(){
    //取得查詢選項(xiàng)
    int selectedIndex = jComboBox1.getSelectedIndex();
    String searchValue = jTextField16.getText().trim();
    switch (selectedIndex) {
      case 0:
        //根據(jù)客戶名字取得記錄
        customer = stockManagementData.getCustomersByCustomerName(searchValue);
        break;
      case 1:
        //根據(jù)地區(qū)取得記錄
        customer = stockManagementData.getCustomersByCustomerZone(searchValue);
        break;
    }
    this.showSearchCustomer();
  }
  //單擊事件方法
  public void actionPerformed(ActionEvent e) {
    //取得按鈕的動作字符串
    String actionCommand = e.getActionCommand().trim();
    if(actionCommand.equals("update") | actionCommand.equals("delete")){
      if(jList1.isSelectionEmpty()){
        JOptionPane.showMessageDialog(null, "請選擇客戶.");
        return;
      }
    }
    //單擊按鈕的處理代碼
    if (actionCommand.equals("search")) {
      String searchValue = jTextField16.getText().trim();
      if(searchValue.length() == 0){
        JOptionPane.showMessageDialog(null, "請輸入查詢值");
        return;
      }
      //查詢
      search();
    }else if(actionCommand.equals("create")){
      action = "create";
      this.clearCustomer();
      this.checkBtn(true);
    }else if(actionCommand.equals("update")){
      action = "update";
      this.checkBtn(true);
    }else if(actionCommand.equals("delete")){
      action = "delete";
      this.checkBtn(true);
    }else if(actionCommand.equals("ok")){
      //取得客戶的值
      String[] customerArray = new String[17];
      customerArray[0] = jTextField1.getText().trim();
      customerArray[1] = jTextField2.getText().trim();
      customerArray[2] = jTextField3.getText().trim();
      customerArray[3] = jTextField4.getText().trim();
      customerArray[4] = jTextField5.getText().trim();
      customerArray[5] = jTextField6.getText().trim();
      customerArray[6] = jTextField7.getText().trim();
      customerArray[7] = jTextField8.getText().trim();
      customerArray[8] = jTextField9.getText().trim();
      customerArray[9] = jTextField10.getText().trim();
      customerArray[10] = jTextField11.getText().trim();
      customerArray[11] = jTextField12.getText().trim();
      customerArray[12] = jTextField13.getText().trim();
      customerArray[13] = jTextField14.getText().trim();
      customerArray[14] = jTextField15.getText().trim();
      customerArray[15] = "0";
      customerArray[16] = jTextArea1.getText().trim();
      if(customerArray[0].length() == 0){
        JOptionPane.showMessageDialog(null, "客戶名字不允許空值.");
        return;
      }
      if(action.equals("create")){
        //創(chuàng)建客戶
        int result = stockManagementData.createCustomer(customerArray);
        if(result == 1){
          //為列表框加入客戶
          listData1.addElement(customerArray[0]);
          //更新客戶數(shù)組
          String[][] tempStrs = new String[customer.length + 1][17];
          System.arraycopy(customer, 0, tempStrs, 0, customer.length);
          for(int i = 0; i < 17; i++){
            tempStrs[customer.length][i] = customerArray[i];
          }
          customer = tempStrs;
          jList1.setSelectedIndex(listData1.size() -1);
        }else{
          JOptionPane.showMessageDialog(null, "客戶創(chuàng)建失敗,請檢查該客戶是否存在和值是否超出字段長度.");
        }
      }else if (action.equals("update")){
        //客戶信用限度保存不變
        int selectedIndex = jList1.getSelectedIndex();
        customerArray[15] = customer[selectedIndex][15];
        //更新客戶
        int result = stockManagementData.updateCustomer(customerArray);
        if(result == 1){
          //更新客戶數(shù)組
          for(int i = 0; i < 17; i++){
            if(i == 15){
              continue;
            }else{
              customer[selectedIndex][i] = customerArray[i];
            }
          }
        }else{
          JOptionPane.showMessageDialog(null, "客戶更新失敗.");
        }
      }else if (action.equals("delete")){
        //刪除客戶
        int result = stockManagementData.deleteCustomer(customerArray[0]);
        if(result == 1){
          int selectedIndex = jList1.getSelectedIndex();
          //刪除列表框的數(shù)據(jù)
          listData1.removeElementAt(selectedIndex);
          //更改數(shù)組的數(shù)據(jù)
          String[][] tempStrs = new String[customer.length -1][17];
          int line = 0;
          for(int i = 0; i < customer.length; i++){
            if(i == selectedIndex){
              continue;
            }else{
              for(int j = 0; j < 17; j++){
                tempStrs[line][j] = customer[i][j];
              }
              line++;
            }
          }
          customer = tempStrs;
          //清空編輯框的值
          this.clearCustomer();
        }else{
          JOptionPane.showMessageDialog(null, "客戶刪除失敗.");
        }
      }
      this.checkBtn(false);
    }else if(actionCommand.equals("cancel")){
       this.jList1_valueChanged(null);
       this.checkBtn(false);
    }else if(actionCommand.equals("exit")){
      exit();
    }
  }
}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久久蜜桃精品| 久久99久久精品| 一区二区三区资源| 中文字幕一区二区三区四区| 精品久久久久久久久久久久久久久 | 一本久道中文字幕精品亚洲嫩| 蜜臀av一区二区在线免费观看| 天天做天天摸天天爽国产一区| 亚洲国产你懂的| 捆绑变态av一区二区三区| 国内不卡的二区三区中文字幕 | 91影视在线播放| 色偷偷成人一区二区三区91| 色婷婷亚洲一区二区三区| 欧美日韩一区高清| 亚洲精品一区二区三区影院| 国产欧美日韩久久| 日本一区二区三区国色天香| 亚洲国产日产av| 另类小说综合欧美亚洲| 久久99精品久久久久久国产越南 | 久88久久88久久久| 国产成人99久久亚洲综合精品| 国产精品一区二区在线观看不卡| 91猫先生在线| 欧美精品一区二区久久婷婷| 亚洲一二三专区| 日韩影院免费视频| av欧美精品.com| 久久久久久久电影| 蜜桃视频在线观看一区| 99久久综合精品| 日韩免费高清电影| 综合激情成人伊人| 高清shemale亚洲人妖| 91精品国产综合久久久久| 国产日产欧产精品推荐色 | 99久久综合色| 中文字幕在线观看不卡| 麻豆91在线观看| yourporn久久国产精品| 中文字幕乱码亚洲精品一区 | 91丨porny丨蝌蚪视频| 中文字幕中文字幕中文字幕亚洲无线| 狠狠色丁香婷婷综合| 国产午夜久久久久| 99久久婷婷国产综合精品电影 | 日韩精品中文字幕一区二区三区 | 国产在线日韩欧美| 欧美国产日本视频| 欧美va亚洲va香蕉在线| 精品一区二区三区的国产在线播放| 日韩美女视频一区二区在线观看| 六月婷婷色综合| 亚洲日本乱码在线观看| 欧美色图在线观看| 韩国欧美国产1区| 亚洲综合激情另类小说区| 久久综合色8888| 欧美美女黄视频| 99re6这里只有精品视频在线观看| 亚洲午夜视频在线观看| 欧美国产禁国产网站cc| 欧美一二三四区在线| 在线区一区二视频| 91福利小视频| www.亚洲激情.com| 在线看日本不卡| 国产麻豆精品95视频| 日本成人超碰在线观看| 久久精品99国产国产精| 99精品久久免费看蜜臀剧情介绍| 欧美二区三区91| 亚洲欧洲精品成人久久奇米网| 亚洲欧洲国产专区| 亚洲成人av资源| 成人黄色在线看| 26uuu成人网一区二区三区| 亚洲少妇30p| 成人国产亚洲欧美成人综合网| 欧美日韩精品一区二区三区 | 国内精品久久久久影院一蜜桃| 亚洲不卡一区二区三区| 精品在线观看视频| 国产精品一区二区在线观看网站| 久久国产精品99久久久久久老狼| 国产成人av福利| 欧美自拍偷拍午夜视频| 精品剧情v国产在线观看在线| 亚洲精品在线电影| 一区二区三区加勒比av| 精品一区二区三区的国产在线播放| 成人永久aaa| 日韩午夜电影av| 亚洲视频香蕉人妖| 国产成人精品亚洲午夜麻豆| 欧美午夜片在线看| 日韩一区在线看| 国产不卡在线视频| 日韩精品一区二区三区视频在线观看| 中文字幕免费不卡在线| 国产一区高清在线| 日韩欧美亚洲国产另类 | 免费观看日韩电影| 91污片在线观看| 亚洲欧美日韩一区二区三区在线观看| 国产综合久久久久久鬼色| 欧美一区二区三区视频| 亚洲专区一二三| 欧美日韩一区中文字幕| 成人18视频日本| 国产午夜精品一区二区三区嫩草| 国产精品久久久久三级| 亚洲一区二区三区美女| 免费成人结看片| 亚洲精品美腿丝袜| 天堂av在线一区| 国产在线看一区| 91丝袜美腿高跟国产极品老师 | 久草精品在线观看| 精品久久久久久久久久久久包黑料| 日韩精品三区四区| 久久色在线视频| 欧美日韩国产综合一区二区三区| 亚洲激情六月丁香| 欧美成人精精品一区二区频| 国产一区二区女| 亚洲国产aⅴ成人精品无吗| 日韩一二三区视频| 91在线一区二区三区| 亚洲1区2区3区4区| 国产精品无遮挡| 色狠狠桃花综合| 成人手机在线视频| 日本大胆欧美人术艺术动态| 国产精品国产三级国产普通话蜜臀 | 亚洲欧洲av一区二区三区久久| 在线观看欧美精品| 成人精品免费视频| 日韩va欧美va亚洲va久久| 中文欧美字幕免费| 精品免费一区二区三区| 欧美日韩国产美| 92国产精品观看| 91免费小视频| 成人av在线一区二区| 黑人巨大精品欧美一区| 日韩电影免费在线看| 五月婷婷另类国产| 日韩国产精品久久久久久亚洲| 国产精品网站一区| 日本一区二区三区免费乱视频| 欧美大胆一级视频| 国产欧美一区二区精品忘忧草 | 欧美日韩国产综合一区二区三区| 成人一区二区三区中文字幕| 国产精品1区二区.| 97精品国产露脸对白| 色噜噜狠狠成人中文综合 | 国产精品中文字幕日韩精品| 国产呦精品一区二区三区网站 | 亚洲国产成人av好男人在线观看| 亚洲一区二区三区中文字幕| 亚洲国产一区二区三区| 免费在线看一区| 色婷婷久久久综合中文字幕| 欧美日韩国产小视频| 国产亚洲欧洲一区高清在线观看| 亚洲欧洲成人精品av97| 日本中文字幕不卡| zzijzzij亚洲日本少妇熟睡| 欧美精品乱码久久久久久| 国产亚洲人成网站| 美女任你摸久久| 欧美在线视频日韩| 国产精品入口麻豆九色| 日韩成人精品在线观看| 91蝌蚪porny| 亚洲国产精品精华液2区45| 日韩av一区二区在线影视| www.av亚洲| 日韩一区在线播放| 成人免费视频app| 久久久久99精品一区| 九九**精品视频免费播放| 欧美日韩日日摸| 午夜久久久久久| 精品视频全国免费看| 亚洲国产毛片aaaaa无费看 | 亚洲欧洲综合另类在线| 99久久免费国产| 亚洲v日本v欧美v久久精品| 日本韩国视频一区二区| 亚洲欧洲精品一区二区三区| 99久久精品国产观看| 亚洲国产精品综合小说图片区| 欧美欧美欧美欧美首页| 午夜免费久久看| wwww国产精品欧美| 在线视频一区二区免费|