Package com.centraview.sale.opportunity

Examples of com.centraview.sale.opportunity.OpportunityLocalHome.create()


                }
                break;
              case ActivityVO.ACTIVITY_LINK_OPPORTUNITY : // Opportunity - from module table
                try {
                  OpportunityLocalHome home = (OpportunityLocalHome)ic.lookup("local/Opportunity");
                  OpportunityLocal local = home.create();
                  local.setDataSource(this.dataSource);
                  String opportunityName = local.getOpportunityName(linkId);
                  app.setRelatedFieldID(linkId);
                  app.setRelatedFieldValue(opportunityName);
                  app.setRelatedTypeID(ActivityVO.ACTIVITY_LINK_OPPORTUNITY);
View Full Code Here


                }
                break;
              case ActivityVO.ACTIVITY_LINK_PROJECT : // Projects - from module table
                try {
                  ProjectLocalHome home = (ProjectLocalHome)ic.lookup("local/Project");
                  ProjectLocal remote = (ProjectLocal)home.create();
                  remote.setDataSource(this.dataSource);
                  String projectTitle = remote.getProjectName(linkId);
                  app.setRelatedFieldID(linkId);
                  app.setRelatedFieldValue(projectTitle);
                  app.setRelatedTypeID(ActivityVO.ACTIVITY_LINK_PROJECT);
View Full Code Here

      if ((oldIncludeFlag != newIncludeFlag) || newIncludeFlag) {
        // get EJB to Opportunity
        int opportunityID = Integer.parseInt(proposalForm.getOpportunityid());
        InitialContext ic = CVUtility.getInitialContext();
        OpportunityLocalHome home = (OpportunityLocalHome)ic.lookup("local/Opportunity");
        OpportunityLocal local = home.create();
        local.setDataSource(this.dataSource);
        float opportunityTotal = local.updateTotalAmount(opportunityID);
        local.updateForcastAmount(opportunityTotal, opportunityID);
        // do the update
      }
View Full Code Here

          {
            case 30: // Opportunity - from module table
              try
              {
                OpportunityLocalHome home = (OpportunityLocalHome)ic.lookup("local/Opportunity");
                OpportunityLocal local = home.create();
                local.setDataSource(this.dataSource);
                String opportunityName = local.getOpportunityName(linkId);
                flvo.setRelatedFieldID(linkId);
                flvo.setRelatedFieldValue(opportunityName);
                flvo.setRelatedTypeID(30);
View Full Code Here

              break;
            case 31: // Proposal - from module table
              try
              {
                ProposalHome home = (ProposalHome)ic.lookup("local/Proposal");
                ProposalLocal remote =  home.create();
                remote.setDataSource(this.dataSource);
                String proposalTitle = remote.getProposalName(linkId);
                flvo.setRelatedFieldID(linkId);
                flvo.setRelatedFieldValue(proposalTitle);
                flvo.setRelatedTypeID(31);
View Full Code Here

            case 36: // Projects - from module table
              try
              {
                ProjectLocalHome home = (ProjectLocalHome)ic.lookup("local/Project");
                ProjectLocal remote = home.create();
                remote.setDataSource(this.dataSource);
                String projectTitle = remote.getProjectName(linkId);
                flvo.setRelatedFieldID(linkId);
                flvo.setRelatedFieldValue(projectTitle);
                flvo.setRelatedTypeID(36);
View Full Code Here

              break;
            case 39: // Ticket - from module table
              try
              {
                TicketLocalHome home = (TicketLocalHome)ic.lookup("local/Ticket");
                TicketLocal remote = home.create();
                remote.setDataSource(this.dataSource);
                String ticketSubject = remote.getTicketName(linkId);
                flvo.setRelatedFieldID(linkId);
                flvo.setRelatedFieldValue(ticketSubject);
                flvo.setRelatedTypeID(39);
View Full Code Here

    try {

      // System.out.println("deleteOpportunity---1");
      InitialContext ic = CVUtility.getInitialContext();
      OpportunityLocalHome home = (OpportunityLocalHome)ic.lookup("local/Opportunity");
      OpportunityLocal local = home.create();
      local.setDataSource(this.dataSource);
      result = local.deleteOpportunity(userid, elementid);
    } catch (CreateException ce) {
      throw new EJBException(ce);
    } catch (NamingException re) {
View Full Code Here

    int rowID = 0;

    try {
      InitialContext ic = CVUtility.getInitialContext();
      OpportunityLocalHome home = (OpportunityLocalHome)ic.lookup("local/Opportunity");
      OpportunityLocal remote = home.create();
      remote.setDataSource(this.dataSource);
      ctx.getUserTransaction().begin();
      rowID = remote.addOpportunity(userId, oVO);
      ctx.getUserTransaction().commit();
    } catch (Exception e) {
View Full Code Here

      throw new AuthorizationFailedException("Opportunities - updateOpportunity");

    try {
      InitialContext ic = CVUtility.getInitialContext();
      OpportunityLocalHome home = (OpportunityLocalHome)ic.lookup("local/Opportunity");
      OpportunityLocal remote = home.create();
      remote.setDataSource(this.dataSource);
      ctx.getUserTransaction().begin();
      remote.updateOpportunity(userId, oVO);
      ctx.getUserTransaction().commit();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.