Search in sources :

Example 1 with ClientTransferActionForm

use of org.mifos.customers.client.struts.actionforms.ClientTransferActionForm in project head by mifos.

the class ClientTransferAction method updateParent.

@CloseSession
@TransactionDemarcate(validateAndResetToken = true)
public ActionForward updateParent(ActionMapping mapping, ActionForm form, HttpServletRequest request, @SuppressWarnings("unused") HttpServletResponse response) throws Exception {
    ClientTransferActionForm actionForm = (ClientTransferActionForm) form;
    ClientBO clientInSession = (ClientBO) SessionUtils.getAttribute(Constants.BUSINESS_KEY, request);
    String globalCustNum = this.clientServiceFacade.transferClientToGroup(actionForm.getParentGroupIdValue(), clientInSession.getGlobalCustNum(), clientInSession.getVersionNo());
    ClientBO client = this.customerDao.findClientBySystemId(globalCustNum);
    SessionUtils.setAttribute(Constants.BUSINESS_KEY, client, request);
    return mapping.findForward(ActionForwards.update_success.toString());
}
Also used : ClientTransferActionForm(org.mifos.customers.client.struts.actionforms.ClientTransferActionForm) ClientBO(org.mifos.customers.client.business.ClientBO) CloseSession(org.mifos.framework.util.helpers.CloseSession) TransactionDemarcate(org.mifos.framework.util.helpers.TransactionDemarcate)

Example 2 with ClientTransferActionForm

use of org.mifos.customers.client.struts.actionforms.ClientTransferActionForm in project head by mifos.

the class ClientTransferAction method transferToBranch.

@TransactionDemarcate(validateAndResetToken = true)
@CloseSession
public ActionForward transferToBranch(ActionMapping mapping, ActionForm form, HttpServletRequest request, @SuppressWarnings("unused") HttpServletResponse response) throws Exception {
    ClientTransferActionForm actionForm = (ClientTransferActionForm) form;
    ClientBO clientInSession = (ClientBO) SessionUtils.getAttribute(Constants.BUSINESS_KEY, request);
    String globalCustNum = this.clientServiceFacade.transferClientToBranch(clientInSession.getGlobalCustNum(), actionForm.getOfficeIdValue());
    ClientBO client = this.customerDao.findClientBySystemId(globalCustNum);
    SessionUtils.setAttribute(Constants.BUSINESS_KEY, client, request);
    return mapping.findForward(ActionForwards.update_success.toString());
}
Also used : ClientTransferActionForm(org.mifos.customers.client.struts.actionforms.ClientTransferActionForm) ClientBO(org.mifos.customers.client.business.ClientBO) CloseSession(org.mifos.framework.util.helpers.CloseSession) TransactionDemarcate(org.mifos.framework.util.helpers.TransactionDemarcate)

Aggregations

ClientBO (org.mifos.customers.client.business.ClientBO)2 ClientTransferActionForm (org.mifos.customers.client.struts.actionforms.ClientTransferActionForm)2 CloseSession (org.mifos.framework.util.helpers.CloseSession)2 TransactionDemarcate (org.mifos.framework.util.helpers.TransactionDemarcate)2