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

📄 mainframe.java~310~

📁 超值周末现场管理软件,用Excel存储数据
💻 JAVA~310~
📖 第 1 页 / 共 4 页
字号:
                                                new Insets(5, 30, 5, 10), 0, 0));
    ldlPanel.add(ldl_reset, new GridBagConstraints(3, 12, 3, 1, 0.0, 0.0
        , GridBagConstraints.WEST, GridBagConstraints.NONE,
        new Insets(5, 10, 5, 30), 0, 0));

    ldlPanel.add(jLabel1, new GridBagConstraints(6, 2, 1, 1, 0.0, 0.0
                                                 , GridBagConstraints.CENTER,
                                                 GridBagConstraints.NONE,
                                                 new Insets(5, 10, 5, 10), 0, 0));
    ldlPanel.add(jLabel2, new GridBagConstraints(6, 6, 1, 1, 0.0, 0.0
                                                 , GridBagConstraints.CENTER,
                                                 GridBagConstraints.NONE,
                                                 new Insets(5, 10, 5, 10), 0, 0));
    ldlPanel.add(jLabel3, new GridBagConstraints(6, 8, 1, 1, 0.0, 0.0
                                                 , GridBagConstraints.CENTER,
                                                 GridBagConstraints.NONE,
                                                 new Insets(5, 10, 5, 10), 0, 0));
    ldlPanel.add(jLabel4, new GridBagConstraints(6, 10, 1, 1, 0.0, 0.0
                                                 , GridBagConstraints.CENTER,
                                                 GridBagConstraints.NONE,
                                                 new Insets(5, 10, 5, 10), 0, 0));
    ldlPanel.add(jLabel5, new GridBagConstraints(6, 12, 1, 1, 0.0, 0.0
                                                 , GridBagConstraints.CENTER,
                                                 GridBagConstraints.NONE,
                                                 new Insets(5, 10, 5, 10), 0, 0));
    ldlPanel.add(jLabel6, new GridBagConstraints(0, 12, 2, 1, 0.0, 0.0
                                                 , GridBagConstraints.CENTER,
                                                 GridBagConstraints.NONE,
                                                 new Insets(5, 10, 5, 10), 0, 0));
    ldlPanel.add(ldlTitle, new GridBagConstraints(0, 1, 5, 1, 1.0, 1.0
                                                  , GridBagConstraints.CENTER,
                                                  GridBagConstraints.NONE,
                                                  new Insets(0, 0, 0, 0), 0, 0));
    tabbedPane.add(fvoPanel, "满500送100");
    fvoPanel.add(fvoNameLbl, new GridBagConstraints(0, 2, 2, 1, 0.0, 0.0
        , GridBagConstraints.CENTER, GridBagConstraints.NONE,
        new Insets(5, 30, 5, 10), 0, 0));
    fvoPanel.add(fvoIDCardLbl, new GridBagConstraints(0, 3, 2, 1, 0.0, 0.0
        , GridBagConstraints.CENTER, GridBagConstraints.NONE,
        new Insets(5, 30, 5, 10), 0, 0));
    fvoPanel.add(fvoAccountLbl, new GridBagConstraints(0, 4, 2, 2, 0.0, 0.0
        , GridBagConstraints.CENTER, GridBagConstraints.NONE,
        new Insets(5, 30, 5, 10), 0, 0));
    fvoPanel.add(fvoAmountLbl, new GridBagConstraints(0, 6, 2, 2, 0.0, 0.0
        , GridBagConstraints.CENTER, GridBagConstraints.NONE,
        new Insets(5, 30, 5, 10), 0, 0));
    fvoPanel.add(fvoAuthNumLbl, new GridBagConstraints(0, 8, 2, 2, 0.0, 0.0
        , GridBagConstraints.CENTER, GridBagConstraints.NONE,
        new Insets(5, 30, 5, 10), 0, 0));
    fvoPanel.add(fvoDealDateLbl, new GridBagConstraints(0, 10, 2, 2, 0.0, 0.0
        , GridBagConstraints.CENTER, GridBagConstraints.NONE,
        new Insets(5, 30, 5, 10), 0, 0));
    fvoPanel.add(fvoCustomerNameTxt,
                 new GridBagConstraints(2, 2, 2, 1, 1.0, 0.0
                                        , GridBagConstraints.CENTER,
                                        GridBagConstraints.BOTH,
                                        new Insets(5, 10, 5, 10), 162, 4));
    fvoPanel.add(fvoCustomerIDCardTxt,
                 new GridBagConstraints(2, 3, 2, 1, 1.0, 0.0
                                        , GridBagConstraints.CENTER,
                                        GridBagConstraints.BOTH,
                                        new Insets(5, 10, 5, 10), 162, 4));
    fvoPanel.add(fvoAccountTxt, new GridBagConstraints(2, 4, 2, 1, 1.0, 0.0
        , GridBagConstraints.CENTER, GridBagConstraints.BOTH,
        new Insets(5, 10, 5, 10), 162, 4));
    fvoPanel.add(fvoAmountTxt, new GridBagConstraints(2, 6, 2, 1, 1.0, 0.0
        , GridBagConstraints.CENTER, GridBagConstraints.BOTH,
        new Insets(5, 10, 5, 10), 162, 4));
    fvoPanel.add(fvoAuthNumTxt, new GridBagConstraints(2, 8, 2, 1, 1.0, 0.0
        , GridBagConstraints.CENTER, GridBagConstraints.BOTH,
        new Insets(5, 10, 5, 10), 162, 4));
    fvoPanel.add(fvoDealDateTxt, new GridBagConstraints(2, 10, 2, 1, 1.0, 0.0
        , GridBagConstraints.CENTER, GridBagConstraints.BOTH,
        new Insets(5, 10, 5, 10), 162, 4));
    fvoPanel.add(check_fvodcard_unique,
                 new GridBagConstraints(6, 3, 1, 1, 0.0, 0.0
                                        , GridBagConstraints.CENTER,
                                        GridBagConstraints.NONE,
                                        new Insets(5, 30, 5, 10), 0, 0));
    fvoPanel.add(check_fvoAccount_unique,
                 new GridBagConstraints(6, 4, 1, 2, 0.0, 0.0
                                        , GridBagConstraints.CENTER,
                                        GridBagConstraints.NONE,
                                        new Insets(5, 30, 5, 10), 0, 0));
    fvoPanel.add(fvo_ok, new GridBagConstraints(2, 12, 1, 1, 0.0, 1.0
                                                , GridBagConstraints.EAST,
                                                GridBagConstraints.NONE,
                                                new Insets(5, 30, 5, 10), 0, 0));
    fvoPanel.add(fvo_reset, new GridBagConstraints(3, 12, 3, 1, 0.0, 0.0
        , GridBagConstraints.WEST, GridBagConstraints.NONE,
        new Insets(5, 10, 5, 30), 0, 0));
    fvoPanel.add(jLabel8, new GridBagConstraints(6, 2, 1, 1, 0.0, 0.0
                                                 , GridBagConstraints.CENTER,
                                                 GridBagConstraints.NONE,
                                                 new Insets(5, 10, 5, 10), 0, 0));
    fvoPanel.add(jLabel10, new GridBagConstraints(6, 6, 1, 1, 0.0, 0.0
                                                  , GridBagConstraints.CENTER,
                                                  GridBagConstraints.NONE,
                                                  new Insets(5, 10, 5, 10), 0,
                                                  0));
    fvoPanel.add(jLabel9, new GridBagConstraints(6, 8, 1, 1, 0.0, 0.0
                                                 , GridBagConstraints.CENTER,
                                                 GridBagConstraints.NONE,
                                                 new Insets(5, 10, 5, 10), 0, 0));
    fvoPanel.add(jLabel7, new GridBagConstraints(6, 10, 1, 1, 0.0, 0.0
                                                 , GridBagConstraints.CENTER,
                                                 GridBagConstraints.NONE,
                                                 new Insets(5, 10, 5, 10), 0, 0));
    fvoPanel.add(jLabel12, new GridBagConstraints(6, 12, 1, 1, 0.0, 0.0
                                                  , GridBagConstraints.CENTER,
                                                  GridBagConstraints.NONE,
                                                  new Insets(5, 10, 5, 10), 0,
                                                  0));
    fvoPanel.add(jLabel11, new GridBagConstraints(0, 12, 2, 1, 0.0, 0.0
                                                  , GridBagConstraints.CENTER,
                                                  GridBagConstraints.NONE,
                                                  new Insets(5, 10, 5, 10), 0,
                                                  0));
    fvoPanel.add(fvoTitle, new GridBagConstraints(0, 1, 5, 1, 1.0, 1.0
                                                  , GridBagConstraints.CENTER,
                                                  GridBagConstraints.NONE,
                                                  new Insets(0, 0, 0, 0), 0, 0));
    yzqPanel.add(yzqNameLbl, new GridBagConstraints(0, 1, 2, 1, 0.0, 0.0
        , GridBagConstraints.CENTER, GridBagConstraints.NONE,
        new Insets(5, 30, 5, 10), 0, 0));
    yzqPanel.add(yzqIDCardLbl, new GridBagConstraints(0, 2, 2, 1, 0.0, 0.0
        , GridBagConstraints.CENTER, GridBagConstraints.NONE,
        new Insets(5, 30, 5, 10), 0, 0));
    yzqPanel.add(yzqAccountLbl, new GridBagConstraints(0, 3, 2, 2, 0.0, 0.0
        , GridBagConstraints.CENTER, GridBagConstraints.NONE,
        new Insets(5, 30, 5, 10), 0, 0));
    yzqPanel.add(yzqAmountLbl, new GridBagConstraints(0, 5, 2, 2, 0.0, 0.0
        , GridBagConstraints.CENTER, GridBagConstraints.NONE,
        new Insets(5, 30, 5, 10), 0, 0));
    yzqPanel.add(yzqAuthNumLbl, new GridBagConstraints(0, 7, 2, 2, 0.0, 0.0
        , GridBagConstraints.CENTER, GridBagConstraints.NONE,
        new Insets(5, 30, 5, 10), 0, 0));
    yzqPanel.add(yzqDealDateLbl, new GridBagConstraints(0, 9, 2, 2, 0.0, 0.0
        , GridBagConstraints.CENTER, GridBagConstraints.NONE,
        new Insets(5, 30, 5, 10), 0, 0));
    yzqPanel.add(yzqCustomerNameTxt,
                 new GridBagConstraints(2, 1, 2, 1, 1.0, 0.0
                                        , GridBagConstraints.CENTER,
                                        GridBagConstraints.BOTH,
                                        new Insets(5, 10, 5, 10), 162, 4));
    yzqPanel.add(yzqCustomerIDCardTxt,
                 new GridBagConstraints(2, 2, 2, 1, 1.0, 0.0
                                        , GridBagConstraints.CENTER,
                                        GridBagConstraints.BOTH,
                                        new Insets(5, 10, 5, 10), 162, 4));
    yzqPanel.add(yzqAccountTxt, new GridBagConstraints(2, 3, 2, 1, 1.0, 0.0
        , GridBagConstraints.CENTER, GridBagConstraints.BOTH,
        new Insets(5, 10, 5, 10), 162, 4));
    yzqPanel.add(yzqAmountTxt, new GridBagConstraints(2, 5, 2, 1, 1.0, 0.0
        , GridBagConstraints.CENTER, GridBagConstraints.BOTH,
        new Insets(5, 10, 5, 10), 162, 4));
    yzqPanel.add(yzqAuthNumTxt, new GridBagConstraints(2, 7, 2, 1, 1.0, 0.0
        , GridBagConstraints.CENTER, GridBagConstraints.BOTH,
        new Insets(5, 10, 5, 10), 162, 4));
    yzqPanel.add(yzqDealDateTxt, new GridBagConstraints(2, 9, 2, 1, 1.0, 0.0
        , GridBagConstraints.CENTER, GridBagConstraints.BOTH,
        new Insets(5, 10, 5, 10), 162, 4));
    yzqPanel.add(check_yzqdcard_unique,
                 new GridBagConstraints(6, 2, 1, 1, 0.0, 0.0
                                        , GridBagConstraints.CENTER,
                                        GridBagConstraints.NONE,
                                        new Insets(5, 30, 5, 10), 0, 0));
    yzqPanel.add(check_yzqAccount_unique,
                 new GridBagConstraints(6, 3, 1, 2, 0.0, 0.0
                                        , GridBagConstraints.CENTER,
                                        GridBagConstraints.NONE,
                                        new Insets(5, 30, 5, 10), 0, 0));
    yzqPanel.add(yzq_ok, new GridBagConstraints(2, 13, 1, 2, 0.0, 1.0
                                                , GridBagConstraints.EAST,
                                                GridBagConstraints.NONE,
                                                new Insets(5, 30, 5, 10), 0, 0));
    yzqPanel.add(yzq_reset, new GridBagConstraints(3, 13, 3, 2, 0.0, 0.0
        , GridBagConstraints.WEST, GridBagConstraints.NONE,
        new Insets(5, 10, 5, 30), 0, 0));
    yzqPanel.add(jLabel13, new GridBagConstraints(6, 1, 1, 1, 0.0, 0.0
                                                  , GridBagConstraints.CENTER,
                                                  GridBagConstraints.NONE,
                                                  new Insets(5, 10, 5, 10), 0,
                                                  0));
    yzqPanel.add(jLabel18, new GridBagConstraints(6, 5, 1, 1, 0.0, 0.0
                                                  , GridBagConstraints.CENTER,
                                                  GridBagConstraints.NONE,
                                                  new Insets(5, 10, 5, 10), 0,
                                                  0));
    yzqPanel.add(jLabel15, new GridBagConstraints(6, 7, 1, 1, 0.0, 0.0
                                                  , GridBagConstraints.CENTER,
                                                  GridBagConstraints.NONE,
                                                  new Insets(5, 10, 5, 10), 0,
                                                  0));
    yzqPanel.add(jLabel17, new GridBagConstraints(6, 9, 1, 1, 0.0, 0.0
                                                  , GridBagConstraints.CENTER,
                                                  GridBagConstraints.NONE,
                                                  new Insets(5, 10, 5, 10), 0,
                                                  0));
    yzqPanel.add(jLabel14, new GridBagConstraints(6, 11, 1, 2, 0.0, 0.0
                                                  , GridBagConstraints.CENTER,
                                                  GridBagConstraints.NONE,
                                                  new Insets(5, 10, 5, 10), 0,
                                                  0));
    yzqPanel.add(jLabel16, new GridBagConstraints(0, 11, 1, 1, 0.0, 0.0
                                                  , GridBagConstraints.CENTER,
                                                  GridBagConstraints.NONE,
                                                  new Insets(5, 10, 0, 0), 0, 0));
    yzqPanel.add(yzqTitle, new GridBagConstraints(0, 0, 5, 1, 1.0, 1.0
                                                  , GridBagConstraints.CENTER,
                                                  GridBagConstraints.NONE,
                                                  new Insets(0, 0, 0, 0), 0, 0));
    yzqPanel.add(yzqProductNameLbl,
                 new GridBagConstraints(0, 11, 2, 2, 0.0, 0.0
                                        , GridBagConstraints.CENTER,
                                        GridBagConstraints.NONE,
                                        new Insets(5, 30, 5, 10), 0, 0));
    yzqPanel.add(yzqProductNameCmb,
                 new GridBagConstraints(2, 11, 2, 1, 1.0, 0.0
                                        , GridBagConstraints.CENTER,
                                        GridBagConstraints.BOTH,
                                        new Insets(5, 10, 5, 10), 162, 4));
    tabbedPane.add(yzqPanel, "一折起抢购");

  }

  //Overridden so we can exit when window is closed
  protected void processWindowEvent(WindowEvent e) {
    super.processWindowEvent(e);
    if (e.getID() == WindowEvent.WINDOW_CLOSING) {
      System.exit(0);
    }
  }

  private void setProductNameList() {
    java.util.List products = new ArrayList();

    try {

      products = so.getAllProductNames();
    }
    catch (DBException ex) {
      logger.error("",ex);
      showMsgs(Arrays.asList(new String[] {"生成\"商品名称\"列表时出错,请与管理员联系"}));

    }

    yzqProductNameCmb.addItem("");
    for (int i = 0; i < products.size(); i++) {
      this.yzqProductNameCmb.addItem(products.get(i));
    }

  }

  void check_ldlIdcard_unique_actionPerformed(ActionEvent e) {
    String customerIdCard = this.ldlCustomerIDCardTxt.getText().trim();
    String dateString = this.ldlDealDateTxt.getText().trim();

    java.util.List errors = new ArrayList();
    boolean idCardValid = lrv.isCustomerIdCardValid(customerIdCard, errors);
    boolean dateValid = lrv.isDealDateValid(dateString, errors);
    boolean inputValid = idCardValid && dateValid;
    if (!inputValid) {
      showMsgs(errors);
      return;
    }

    Date dealDate = null;
    try {
      dealDate = Common.getInstance().getDateFormat().parse(dateString);
    }
    catch (ParseException ex) {
      java.util.List er = Arrays.asList(new Object[] {"交易日期不合格式"});
      this.showMsgs(er);
      return;
    }

    boolean isUnique = false;
    try {
      isUnique = so.checkLDLIdCardUnique(customerIdCard, dealDate);
    }
    catch (DBException ex) {
       logger.error("",ex);
      java.util.List er = Arrays.asList(new Object[] {dbError});
      this.showMsgs(er);
      return;

    }

    if (!isUnique) {
      java.util.List er = Arrays.asList(new Object[] {"此身份证号已于当日使用"});
      this.showMsgs(er);
      return;
    }
    else {
      java.util.List ok = Arrays.asList(new Object[] {"尚未于当日使用"});
      this.showMsgs(ok);
      return;
    }

  }

  void check_ldlAccount_unique_actionPerformed(ActionEvent e) {
    String dateString = this.ldlDealDateTxt.getText().trim();
    String account = ldlAccountTxt.getText().trim();

    java.util.List errors = new ArrayList();
    boolean accountValid = lrv.isAccountValid(account, errors);
    boolean dateValid = lrv.isDealDateValid(dateString, errors);
    boolean inputValid = accountValid && dateValid;

    if (!inputValid) {
      showMsgs(errors);
      return;
    }

    Date dealDate = null;
    try {
      dealDate = Common.getInstance().getDateFormat().parse(dateString);
    }
    catch (ParseException ex) {
      java.util.List er = Arrays.asList(new Object[] {"交易日期不合格式"});
      this.showMsgs(er);
      return;
    }

    boolean isUnique = false;

    try {
      isUnique = so.checkLDLAccountUnique(account, dealDate);
    }
    catch (DBException ex1) {
       logger.error("",ex1);
      java.util.List er = Arrays.asList(new Object[] {dbError});
      this.showMsgs(er);
      return;
    }

    if (!isUnique) {
      java.util.List er = Arrays.asList(new Object[] {"此银行卡号已于当日使用"});
      this.showMsgs(er);
      return;
    }
    else {
      java.util.List ok = Arrays.asList(new Object[] {"尚未于当日使用"});
      this.showMsgs(ok);
      return;
    }

⌨️ 快捷键说明

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