示例#1
0
  private void btnapplyActionPerformed(
      java.awt.event.ActionEvent evt) { // GEN-FIRST:event_btnapplyActionPerformed
    try {
      String grn = lblgrn.getText();
      String icode = lblicode.getText();
      String lot = lbllot.getText();
      Double OHbal = Double.parseDouble(lblqnty.getText());
      int Count = 0;
      Count =
          voidmodule.RCount(
              "SELECT g_grnno FROM transaction WHERE g_status = '"
                  + "temp"
                  + "'AND g_grnno = '"
                  + grn
                  + "'AND g_itemcode = '"
                  + icode
                  + "'AND g_lot = '"
                  + lot
                  + "'AND g_transtype = '"
                  + "R"
                  + "'");
      if (Count > 0) {
        JOptionPane.showMessageDialog(null, "This is temporary issue");

      } else {
        if (stores == true) {
          object.showinvoice(
              OHbal,
              "SELECT T.g_receipttype,T.g_grnno,T.g_date,T.g_lot,T.g_packsize,T.g_packs,T.g_warehose,T.g_section,T.g_itemcode,T.g_initprice,T.g_Iqnty,T.g_expdate,S.d_name,S.d_unit from transaction as T inner join dgs_surgicallist as S on S.d_srno = T.g_itemcode  WHERE g_grnno ='"
                  + grn
                  + "'AND g_itemcode ='"
                  + icode
                  + "'AND g_lot ='"
                  + lot
                  + "'AND g_transtype ='"
                  + "R"
                  + "'");
        } else {
          object1.showinvoice(
              OHbal,
              "SELECT T.g_receipttype,T.g_invoseno,T.g_grnno,T.g_date,T.g_lot,T.g_packsize,T.g_packs,T.g_warehose,T.g_section,T.g_itemcode,T.g_initprice,T.g_Iqnty,T.g_expdate,S.d_name,S.d_unit from transaction_sub1 as T inner join dgs_surgicallist as S on S.d_srno = T.g_itemcode  WHERE g_grnno ='"
                  + grn
                  + "'AND g_itemcode ='"
                  + icode
                  + "'AND g_lot ='"
                  + lot
                  + "'AND g_transtype ='"
                  + "R"
                  + "'");
        }
        this.setVisible(false);
      }
    } catch (SQLException ex) {
      Logger.getLogger(frmshowgrn.class.getName()).log(Level.SEVERE, null, ex);
    }
  } // GEN-LAST:event_btnapplyActionPerformed
示例#2
0
  private void btnexitActionPerformed(
      java.awt.event.ActionEvent evt) { // GEN-FIRST:event_btnexitActionPerformed

    if (stores == true) {
      object.setfor();
      this.setVisible(false);
    } else {
      object1.setfor();
      this.setVisible(false);
    }
  } // GEN-LAST:event_btnexitActionPerformed