use of operation.GoToOperation in project Money-Manager by krHasan.
the class CashCalculateController method mnuSystemSettings.
@FXML
private void mnuSystemSettings(ActionEvent event) {
(new TabAccess()).setTabName("tabSystem");
Stage CashCalculateStage = (Stage) btnSignOut.getScene().getWindow();
(new GoToOperation()).goToSettings(CashCalculateStage);
}
use of operation.GoToOperation in project Money-Manager by krHasan.
the class CashCalculateController method mnuCreateSource.
@FXML
private void mnuCreateSource(ActionEvent event) {
(new TabAccess()).setTabName("tabSource");
Stage CashCalculateStage = (Stage) btnSignOut.getScene().getWindow();
(new GoToOperation()).goToSettings(CashCalculateStage);
}
use of operation.GoToOperation in project Money-Manager by krHasan.
the class CashCalculateController method btnSignOut.
// /////////////////// Button Function ///////////////////////////
@FXML
private void btnSignOut(ActionEvent event) {
Stage CashCalculateStage = (Stage) btnSignOut.getScene().getWindow();
(new GoToOperation()).goToSignIn(CashCalculateStage);
}
use of operation.GoToOperation in project Money-Manager by krHasan.
the class MakeATransactionController method mnuSystemSettings.
@FXML
private void mnuSystemSettings(ActionEvent event) {
(new TabAccess()).setTabName("tabSystem");
Stage MakeATransactionStage = (Stage) btnSignOut.getScene().getWindow();
(new GoToOperation()).goToSettings(MakeATransactionStage);
}
use of operation.GoToOperation in project Money-Manager by krHasan.
the class MakeATransactionController method gmSavebtn.
@FXML
private void gmSavebtn(ActionEvent event) {
if (amountIsZero(gmtxtAmount.getText())) {
gmlblWarningMsg.setText("Empty or Zero is not approved.");
} else {
try {
Map<String, String> stringData = new HashMap<>();
stringData.put("gmTime", timeToSave());
stringData.put("gmDate", (new DateFormatManager()).toString(gmdateDate.getValue()));
stringData.put("gmMonth", monthToSave(gmdateDate.getValue()));
stringData.put("gmAmount", gmtxtAmount.getText());
if ((gmcmboMethod.getValue()).equals("bKash")) {
stringData.put("gmBankCharge", bkashBnkCharge(gmtxtAmount.getText(), "Cash In"));
} else if ((gmcmboMethod.getValue()).equals("Rocket")) {
stringData.put("gmBankCharge", rocketBnkCharge(gmtxtAmount.getText(), "Cash In", gmGetSelectedrbtnName()));
} else {
stringData.put("gmBankCharge", "0.00");
}
if ((gmcmboMethod.getValue()).equals("bKash")) {
stringData.put("gmAmountNature", "Cash In from Agent");
} else if ((gmcmboMethod.getValue()).equals("Rocket")) {
stringData.put("gmAmountNature", gmGetSelectedrbtnName());
} else {
stringData.put("gmAmountNature", "None");
}
if ((gmcmboMethod.getValue()).equals("bKash")) {
stringData.put("bkBalanceAfter", updatedbKashBalance(gmtxtAmount.getText(), "Cash In"));
(new Bkash()).saveGmBkashData(stringData);
} else if ((gmcmboMethod.getValue()).equals("Rocket")) {
stringData.put("rocBalanceAfter", updatedRocketBalance(gmtxtAmount.getText(), "Cash In", gmGetSelectedrbtnName()));
(new Rocket()).saveGmRocketData(stringData);
}
stringData.put("gmSource", gmcmboSource.getValue());
if (gmIsDescripionEmpty()) {
stringData.put("gmDescription", "None");
} else {
stringData.put("gmDescription", gmtxtDescription.getText());
}
stringData.put("gmMethod", gmcmboMethod.getValue());
stringData.put("gmWalletBalanceBefore", getWalletBalance());
if ((gmcmboMethod.getValue()).equals("Hand to Hand")) {
stringData.put("gmWalletBalanceAfter", gmWalletBalanceAfter(gmtxtAmount.getText()));
setCurrentWalletBalance(gmWalletBalanceAfter(gmtxtAmount.getText()));
} else {
stringData.put("gmWalletBalanceAfter", getWalletBalance());
}
(new GetMoney()).saveGetMoneyData(stringData);
(new ComboboxList()).setAllMonth(monthToSave(gmdateDate.getValue()), yearToSave(gmdateDate.getValue()));
(new ComboboxList()).setAllGmMonth(monthToSave(gmdateDate.getValue()), yearToSave(gmdateDate.getValue()));
gmInitialize();
gmtxtAmount.clear();
gmtxtDescription.clear();
Alert confirmationMsg = new Alert(AlertType.INFORMATION);
confirmationMsg.setTitle("Successfull Transaction");
confirmationMsg.setHeaderText(null);
confirmationMsg.setContentText("Successful.");
Stage MakeATransactionStage = (Stage) gmbtnSave.getScene().getWindow();
confirmationMsg.setX(MakeATransactionStage.getX() + 200);
confirmationMsg.setY(MakeATransactionStage.getY() + 29);
Timeline idlestage = new Timeline(new KeyFrame(Duration.seconds(2), new EventHandler<ActionEvent>() {
@Override
public void handle(ActionEvent event) {
confirmationMsg.hide();
}
}));
idlestage.setCycleCount(1);
idlestage.play();
confirmationMsg.showAndWait();
(new GoToOperation()).goToDashboard(MakeATransactionStage);
} catch (Exception e) {
Alert alert = new Alert(AlertType.WARNING);
alert.setTitle("Transaction Failed");
alert.setHeaderText(null);
alert.setContentText("There something is wrong.");
Stage MakeATransactionStage = (Stage) gmbtnSave.getScene().getWindow();
alert.setX(MakeATransactionStage.getX() + 200);
alert.setY(MakeATransactionStage.getY() + 170);
Timeline idlestage = new Timeline(new KeyFrame(Duration.seconds(2), new EventHandler<ActionEvent>() {
@Override
public void handle(ActionEvent event) {
alert.hide();
}
}));
idlestage.setCycleCount(1);
idlestage.play();
alert.showAndWait();
}
}
}
Aggregations