Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- String billId, simNo, callBill, smsBill, netBill, totalBill, issuedBy;
- public void showBill() {
- double posX = 300, posY = 200;
- BackSceneOnly();
- try {
- String sql = "SELECT * FROM POSTPAID_BILL \n"
- + "WHERE SIM_NO = ? AND ISSUED_BY IS NOT NULL AND IS_PAID = 'NO'";
- Connection con = new DataBase("TELECOM", "hr").getConnection();
- PreparedStatement pst = con.prepareStatement(sql);
- pst.setString(1, phoneno);
- ResultSet rs = pst.executeQuery();
- System.out.println("muri kha");
- if (rs.next()) {
- billId = rs.getString(1);
- simNo = rs.getString(2);
- callBill = rs.getString(3);
- smsBill = rs.getString(4);
- netBill = rs.getString(5);
- totalBill = rs.getString(6);
- issuedBy = rs.getString(7);
- Text bid = new Text("Bill ID : " + billId);
- bid.setX(posX);
- bid.setY(posY + 100);
- bid.setFill(Color.rgb(0, 0, 0));
- Text simno = new Text("User SIM No : " + simNo);
- simno.setX(posX);
- simno.setY(posY + 150);
- simno.setFill(Color.rgb(0, 0, 0));
- Text cb = new Text("Bill For Call : " + callBill);
- cb.setX(posX);
- cb.setY(posY + 200);
- cb.setFill(Color.rgb(0, 0, 0));
- Text sb = new Text("Bill For SMS : " + smsBill);
- sb.setX(posX);
- sb.setY(posY + 250);
- sb.setFill(Color.rgb(0, 0, 0));
- Text nb = new Text("Bill For Net : " + netBill);
- nb.setX(posX);
- nb.setY(posY + 300);
- nb.setFill(Color.rgb(0, 0, 0));
- Text totbill = new Text("Total Bill : " + totalBill);
- totbill.setX(posX);
- totbill.setY(posY + 350);
- totbill.setFill(Color.rgb(0, 0, 0));
- Text ib = new Text("Issued By : " + issuedBy );
- ib.setX(posX);
- ib.setY(posY + 400);
- ib.setFill(Color.rgb(0, 0, 0));
- root.getChildren().add(ib);
- root.getChildren().add(totbill);
- root.getChildren().add(nb);
- root.getChildren().add(sb);
- root.getChildren().add(cb);
- root.getChildren().add(simno);
- root.getChildren().add(bid);
- StageShow();
- SuccessMsg("", "You have a due of " + totalBill + " Taka");
- } else {
- SuccessMsg("Congratulations!", "You don't have any due right now");
- }
- pst.close();
- con.close();
- SuccessMsg("Success", "Your Balance Was retrieved");
- } catch (Exception e) {
- System.out.println(balance);
- InvalidLogInMsg("failed", "Can't check Balance");
- }
- goToProfileButton(300 + 200, 600);
- StageShow();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement