public Controller getControl(ControlType pType) { if (pType == ControlType.ControlCalendar) { Controller controlCalendar = ControllerCalendar.getInstance(); return(controlCalendar); } else if (pType == ControlType.ControlMedicine) { Controller controlMedicine = ControllerMedicine.getInstance(); return(controlMedicine); } else if (pType == ControlType.ControlPayment) { Controller controlPayment = ControllerPayment.getInstance(); return(controlPayment); } else if (pType == ControlType.ControlUser) { Controller controlUser = ControllerUser.getInstance(); return(controlUser); } else { return(null); } }
private void loadData(User pUser) { user = pUser; ControllerPayment.getInstance().user = this.user; ControllerCalendar.getInstance().user = this.user; ControllerMedicine.getInstance().user = this.user; }
public static ControllerPayment getInstance() { if (instance == null) { instance = new ControllerPayment(); } return(instance); }