use of com.axelor.apps.marketing.db.Campaign in project axelor-open-suite by axelor.
the class CampaignController method inviteAllTargets.
public void inviteAllTargets(ActionRequest request, ActionResponse response) {
Campaign campaign = request.getContext().asType(Campaign.class);
try {
Beans.get(CampaignService.class).inviteAllTargets(Beans.get(CampaignRepository.class).find(campaign.getId()));
response.setReload(true);
} catch (Exception e) {
TraceBackService.trace(response, e);
}
}
use of com.axelor.apps.marketing.db.Campaign in project axelor-open-suite by axelor.
the class CampaignController method markPartnerPresent.
public void markPartnerPresent(ActionRequest request, ActionResponse response) {
Campaign campaign = request.getContext().getParent().asType(Campaign.class);
Partner partner = request.getContext().asType(Partner.class);
partner = Beans.get(PartnerRepository.class).find(partner.getId());
try {
Beans.get(CampaignService.class).markPartnerPresent(Beans.get(CampaignRepository.class).find(campaign.getId()), partner);
response.setReload(true);
} catch (Exception e) {
TraceBackService.trace(response, e);
}
}
use of com.axelor.apps.marketing.db.Campaign in project axelor-open-suite by axelor.
the class CampaignController method inviteSelectedTargets.
public void inviteSelectedTargets(ActionRequest request, ActionResponse response) {
Campaign campaignContext = request.getContext().asType(Campaign.class);
try {
Beans.get(CampaignService.class).inviteSelectedTargets(Beans.get(CampaignRepository.class).find(campaignContext.getId()), campaignContext);
response.setReload(true);
} catch (Exception e) {
TraceBackService.trace(response, e);
}
}
use of com.axelor.apps.marketing.db.Campaign in project axelor-open-suite by axelor.
the class CampaignController method generateTargets.
public void generateTargets(ActionRequest request, ActionResponse response) {
Campaign campaign = request.getContext().asType(Campaign.class);
try {
campaign = Beans.get(CampaignRepository.class).find(campaign.getId());
Beans.get(CampaignService.class).generateTargets(campaign);
} catch (Exception e) {
TraceBackService.trace(response, e);
}
response.setReload(true);
}
use of com.axelor.apps.marketing.db.Campaign in project axelor-open-suite by axelor.
the class CampaignController method addNotParticipatingTargets.
public void addNotParticipatingTargets(ActionRequest request, ActionResponse response) {
Campaign campaignContext = request.getContext().asType(Campaign.class);
try {
Beans.get(CampaignService.class).addNotParticipatingTargets(Beans.get(CampaignRepository.class).find(campaignContext.getId()), campaignContext);
response.setReload(true);
} catch (Exception e) {
TraceBackService.trace(response, e);
}
}
Aggregations