public void saveActivity(InvestorActivity activity) { InvestorActivityDAO activityDao = new MySqlInvestorActivityDao(); bool success = activityDao.saveActivity(activity); if (success) { form.displayMessage("Activity saved successfully"); form.clearTextFields(); } else { form.displayMessage("Something went wrong, try again later"); } }
public void getInvestorFields(Investor investor) { List <InvestorActivity> activityList = null; InvestorActivityDAO activityDao = new MySqlInvestorActivityDao(); activityList = activityDao.getActivityList(investor.id); if (activityList != null) { form.populateDataGrid(activityList); form.populateFields(investor); } else { form.displayMessage("I could not load list"); } }