Package org.spw.controller

Examples of org.spw.controller.FundraisingController


    }

    public String buttonDelete_action() {
        RowKey rk = tableRowGroup1.getRowKey();
        if (rk != null) {
            FundraisingController ctrl = new FundraisingController();
            Fundraising fundraising = (Fundraising)list.getObject(rk);
            ctrl.delete(fundraising);
            list.refreshList();
        }
       
        return null;
    }
View Full Code Here


    protected ApplicationBean1 getApplicationBean1() {
        return (ApplicationBean1)getBean("ApplicationBean1");
    }

    public String buttonValidate_action() {
        FundraisingController ctrl = new FundraisingController();
        ctrl.update(getSessionBean1().getFundraising());
        return "success";
    }
View Full Code Here

    }

    public String buttonDelete_action() {
        RowKey rk = tableRowGroup1.getRowKey();
        if (rk != null) {
            FundraisingController ctrl = new FundraisingController();
            Fundraising fundraising = (Fundraising)list.getObject(rk);
            ctrl.delete(fundraising);
            list.refreshList();
        }
       
        return null;
    }
View Full Code Here

    public FundraisingPlanDataProviderTest(String testName) {
        super(testName);
    }
   
    protected void setUp() throws Exception {
        FundraisingController ctrl = new FundraisingController();
        Fundraising fr = new Fundraising();
        fr.setYearFunding(TEST_YEAR);
        fr.setTarget(new BigDecimal(3600));
        ctrl.create(fr);
        int year = 1900;
        int month = 1;
        FundraisingPlan[] plan = new FundraisingPlan[2];
        FundraisingPlan p1 = new FundraisingPlan();
        p1.setMonthSelected(month);
        p1.setMonthFunding(1);
        p1.setAmount(new BigDecimal(100));
        plan[0] = p1;
        FundraisingPlan p2 = new FundraisingPlan();
        p2.setMonthSelected(month);
        p2.setMonthFunding(2);
        p2.setAmount(new BigDecimal(3500));
        plan[1] = p2;
               
        ctrl.addFundraisingsPlan(year, month, plan);       
    }
View Full Code Here

               
        ctrl.addFundraisingsPlan(year, month, plan);       
    }
   
    protected void tearDown() throws Exception {
        FundraisingController ctrl = new FundraisingController();
        Fundraising fr = ctrl.read(TEST_YEAR);
        if (fr != null) ctrl.delete(fr);
    }
View Full Code Here

     * Creates a new instance of VolunteerDetailsFundraisingXmlReport
     */
    public VolunteerSummaryFundraisingXmlReport(int year) {
        this.year = year;
        //check the fundraising of this year
        Fundraising fundraising = new FundraisingController().read(year);
        target = (fundraising != null)? fundraising.getTarget() : new BigDecimal(0);
       
        programs = new ProgramController().getProgramsYear(year);
        volunteersByMonth = new ArrayList[13];
        Calendar cal = Calendar.getInstance();
View Full Code Here

        totalReceived = new BigDecimal(0);
        totalCheque = new BigDecimal(0);
        totalJustGiving = new BigDecimal(0);
       
        Element selections = new Element("selections");
        FundraisingController ctrl = new FundraisingController();
        fundraising = ctrl.read(year);
       
        SimpleDateFormat monthFormat = new SimpleDateFormat("MMMMMMMMMM");
        String[] months = df.getDateFormatSymbols().getMonths();
        for (int month=1; month < 13; month++) {
            Element selection = new Element("selection");
            selection.addContent(new Element("monthSelected").setText(months[month-1]));
            //add the volunteers
            addVolunteers(selection, month);
           
            //add the plan
            if (fundraising != null) {
                FundraisingPlan[] fundraisingPlan
                        = ctrl.getFundraisingsPlan(year, month);
                for (FundraisingPlan plan : fundraisingPlan) {
                    if (plan != null) {
                        if (plan.getAmount() != null) {
                            Element timetable = new Element("timetable");
                            timetable.addContent(new Element("month").setText(months[plan.getMonthFunding()-1]));
View Full Code Here

            year = cal.get(Calendar.YEAR);
        } else {
            year = volunteer.getYearApplyingFor();
        }
       
        FundraisingController ctrl = new FundraisingController();
        Fundraising fundraising = ctrl.read(year);
        if (fundraising == null) {
            return new BigDecimal(3600);
        }
        return fundraising.getTarget();
    }
View Full Code Here

     * Creates a new instance of VolunteerDetailsFundraisingXmlReport
     */
    public VolunteerSummaryFundraisingXmlReport(int year) {
        this.year = year;
        //check the fundraising of this year
        Fundraising fundraising = new FundraisingController().read(year);
        target = (fundraising != null)? fundraising.getTarget() : new BigDecimal(0);
       
        programs = new ProgramController().getProgramsYear(year);
        volunteersByMonth = new ArrayList[13];
        Calendar cal = Calendar.getInstance();
View Full Code Here

        totalReceived = new BigDecimal(0);
        totalCheque = new BigDecimal(0);
        totalJustGiving = new BigDecimal(0);
       
        Element selections = new Element("selections");
        FundraisingController ctrl = new FundraisingController();
        fundraising = ctrl.read(year);
       
        SimpleDateFormat monthFormat = new SimpleDateFormat("MMMMMMMMMM");
        String[] months = df.getDateFormatSymbols().getMonths();
        for (int month=1; month < 13; month++) {
            Element selection = new Element("selection");
            selection.addContent(new Element("monthSelected").setText(months[month-1]));
            //add the volunteers
            addVolunteers(selection, month);
           
            //add the plan
            if (fundraising != null) {
                FundraisingPlan[] fundraisingPlan
                        = ctrl.getFundraisingsPlan(year, month);
                for (FundraisingPlan plan : fundraisingPlan) {
                    if (plan != null) {
                        if (plan.getAmount() != null) {
                            Element timetable = new Element("timetable");
                            timetable.addContent(new Element("month").setText(months[plan.getMonthFunding()-1]));
View Full Code Here

TOP

Related Classes of org.spw.controller.FundraisingController

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.