Package com.centraview.common

Examples of com.centraview.common.IntMember


        HashMap sqlRow = (HashMap)iter.next();

        String individualName = (String)sqlRow.get("Name");
        int individualID = ((Number)sqlRow.get("IndividualID")).intValue();

        IntMember individualIDfield = new IntMember("IndividualID", individualID, 10, "", 'T', false, 10);

        StringMember nameField = new StringMember("Name", individualName, 10, "/centraview/ViewHandler.do?" + Constants.TYPEOFCONTACT + "=" + Constants.INDIVIDUAL + "&rowId=" + individualID, 'T', true);

        if (moduleName.equals(Constants.ACTIVITYMODULE)) {
          if ((vecView != null) && vecView.contains(new Integer(individualID))) {
View Full Code Here


            itr = itemLines.keySet().iterator();
            while (itr.hasNext())
            {
              Object obj = itr.next();
              ItemElement ILE = (ItemElement)itemLines.get(obj);
              IntMember ItemId = (IntMember)ILE.get("ItemId");
              Integer currItemId = (Integer)ItemId.getMemberValue();
              if ( currItemId.intValue() == removeToken)
              {
                String status = ILE.getLineStatus();
                if (status.equals("Active"))
                {
                  ILE.setLineStatus("Deleted");
                }//end of if (status.equals("Active"))
                else if (status.equals("New"))
                {
                  removeKeys.add(obj);
                }// end of else if (status.equals("New"))
              }//end of if ( currItemId.intValue() == removeToken)
            }//end of while (itr.hasNext())
          }//end of while (st.hasMoreTokens())

          for(int i=0; i<removeKeys.size(); i++)
          {
            itemLines.remove(removeKeys.get(i));
          }// end of for(int i=0; i<removeKeys.size(); i++)
        }// end of if (itemLines != null)

        ((PurchaseOrderForm)form).setItemLines(itemLines);
        request.setAttribute(AccountConstantKeys.TYPEOFOPERATION,"REMOVEITEM");
      }//end of else if ( typeOfOperation != null && typeOfOperation.equals("REMOVEITEM") )
      /*ADD item*/
      else if ( typeOfOperation != null && typeOfOperation.equals("ADDITEM") )
      {

        String newItemID = request.getParameter("theitemid");
        ItemList IL = null ;
        ListGenerator lg = ListGenerator.getListGenerator(dataSource);//get the List Generator object for Listing
        IL = (ItemList )lg.getItemList( individualID , 1, 10 , "" , "ItemID");//called when the request for the list is for first time

        StringTokenizer st;
        String token, nextItr;

        if (newItemID != null)
        {
          st = new StringTokenizer(newItemID, ",");
          itemLines = ((PurchaseOrderForm)form).getItemLines();

          if(itemLines == null)
          itemLines = new ItemLines();
          int counter = itemLines.size();
          while (st.hasMoreTokens())
          {
            token   = (String)st.nextToken();
            int intToken = Integer.parseInt(token);

            Iterator itr = IL.keySet().iterator();
            while (itr.hasNext())
            {
              nextItr = (String)itr.next();
              ListElement ile = (ListElement)IL.get(nextItr);
              IntMember smid = (IntMember)ile.get("ItemID");
              Integer listItemid = (Integer)smid.getMemberValue();
              if ( listItemid.intValue() == intToken )
              {
                StringMember smName = (StringMember)ile.get("Name"); // name = description
                String name = (String) smName.getMemberValue();

                StringMember smSku  = (StringMember) ile.get("SKU");
                String sku = (String)smSku.getMemberValue();
                FloatMember dmprice  = (FloatMember) ile.get("Price");

                float price = Float.parseFloat((dmprice.getMemberValue()).toString());

                int id = ile.getElementID();

                IntMember LineId = new IntMember("LineId",0,'D',"",'T',false,20);
                IntMember ItemId = new IntMember("ItemId",id,'D',"",'T',false,20);
                IntMember  Quantity = new IntMember("Quantity",1,'D',"",'T',false,20);
                FloatMember  PriceEach = new FloatMember("Price",new Float(price),'D',"",'T',false,20);
                StringMember SKU = new StringMember("SKU",sku,'D',"",'T',false);
                StringMember Description = new StringMember("Description",name,'D',"",'T',false);
                FloatMember  PriceExtended = new FloatMember("PriceExtended",new Float(0.0f),'D',"",'T',false,20);

View Full Code Here

  }

  public void setElementId(int elementId)
  {
    this.elementId = elementId;
    IntMember lineIdMember = (IntMember)this.get("LineId");

    if(lineIdMember != null)
      lineIdMember.setMemberValue(elementId);
  }
View Full Code Here

    if (itemid != null)
    {
      for (int i=0;i<itemid.length;i++)
      {
        ItemElement ie = new ItemElement();
        IntMember LineId = new IntMember("LineId",Integer.parseInt(lineid[i]),'D',"",'T',false,20);
        IntMember ItemId = new IntMember("ItemId",Integer.parseInt(itemid[i]),'D',"",'T',false,20);
        IntMember Quantity = new IntMember("Quantity",Integer.parseInt(quantity[i]),'D',"",'T',false,20);
        priceeach[i] = priceeach[i].replaceAll(",","");
        FloatMember  PriceEach = new FloatMember("Price",new Float(priceeach[i]),'D',"",'T',false,20);
        StringMember SKU = new StringMember("SKU",sku[i],'D',"",'T',false);
        StringMember Description = new StringMember("Description",description[i],'D',"",'T',false);
        if(priceExtended[i] != null){
View Full Code Here

         {
       String str = ( String )it.next();
      StringMember sm=null;
          ListElement ele  = ( ListElement )DL.get( str );

      IntMember im = (IntMember) ele.get("ID");
      im.setRequestURL("openWindow('ViewTimeSlipDetail.do?rowId="+((Integer)im.getMemberValue()).intValue()+"&listId="+DL.getListID()+"'"+",'', 740,  335,'scrollbars=yes')");
      sm = ( StringMember )ele.get("Project" );
      if ( sm != null)
      {
        im = (IntMember) ele.get("ProjectID");
        sm.setRequestURL("openPopup('ViewProjectDetail.do?rowId="+((Integer)im.getMemberValue()).intValue()+"&listId="+DL.getListID()+"')");
      }

      sm = ( StringMember )ele.get("CreatedBy" );
      if ( sm != null)
      {
        im = (IntMember) ele.get("Creator");
        sm.setRequestURL("openPopup('ViewIndividualDetail.do?rowId="+((Integer)im.getMemberValue()).intValue()+"&listId="+DL.getListID()+"')");
      }

      sm = ( StringMember )ele.get("Task" );
      if ( sm != null)
      {
        im = (IntMember) ele.get("TaskID");
        sm.setRequestURL("openPopup('ViewProjectTaskDetail.do?rowId="+((Integer)im.getMemberValue()).intValue()+"&listId="+DL.getListID()+"')");
      }
         }
  }
View Full Code Here

        String str = (String)it.next();

        ListElement ele = (ListElement)DL.get(str);

        //sets the URL for this member
        IntMember invoice = (IntMember)ele.get("InvoiceID");
        invoice.setRequestURL("goTo('DisplayEditInvoice.do?rowId=" + ele.getElementID() + "&listId=" + DL.getListID() + "&" + AccountConstantKeys.TYPEOFOPERATION + "=ShowInvoice')");

        //sets the URL for this member
        IntMember order = (IntMember)ele.get("Order");
        order.setRequestURL("goTo('DisplayEditOrder.do?rowId=" + ele.getElementID() + "&listId=" + DL.getListID() + "')");

        //sets the URL for this member
        StringMember cust = (StringMember)ele.get("CustomerID");
        url = "openPopup('ViewEntityDetail.do?rowId=" + ((IntMember)ele.get("CustID")).getMemberValue() + "')";
        cust.setRequestURL(url);
View Full Code Here

          StringMember sm=null;
          ListElement ele  = ( ListElement )DL.get( str );
          sm = ( StringMember )ele.get("Name" );
          sm.setRequestURL("openPopup('ViewEntityDetail.do?rowId="+ele.getElementID()+"&listId="+DL.getListID()+"')");
          sm = ( StringMember )ele.get("PrimaryContact" );
          IntMember im = (IntMember) ele.get("IndividualID");
          sm.setRequestURL("openPopup('ViewIndividualDetail.do?rowId="+((Integer)im.getMemberValue()).intValue()+"&listId="+DL.getListID()+"')");
          sm = ( StringMember )ele.get("Website");
          sm.setRequestURL("openWindowWithTool('"+sm.getDisplayString()+"')");
          sm = ( StringMember )ele.get("Email" );
          sm.setRequestURL("openWindows('mail/Compose.do?to="+sm.getDisplayString()+"',720,585,'')");
        }
View Full Code Here

           
            itr = itemLines.keySet().iterator();
            while (itr.hasNext()) {
              Object obj = itr.next();
              ItemElement ILE = (ItemElement)itemLines.get(obj);
              IntMember ItemId = (IntMember)ILE.get("ItemId");
              Integer currItemId = (Integer)ItemId.getMemberValue();
              if (currItemId.intValue() == removeToken) {
                String status = ILE.getLineStatus();
                if (status.equals("Active")) {
                  ILE.setLineStatus("Deleted");
                } else if (status.equals("New")) {
                  removeKeys.add(obj);
                }
              }
            }
          }   // end while (st.hasMoreTokens())
         
          for (int i = 0; i < removeKeys.size(); i++) {
            itemLines.remove(removeKeys.get(i));
          }
        }
       
        ((OrderForm)form).setJurisdictionVec(taxJurisdiction);
        ((OrderForm)form).setItemLines(itemLines);
        request.setAttribute("ItemLines",itemLines);
      }
     
      if (typeOfOperation != null && typeOfOperation.equals("ADDITEM")) {
        String newItemID = request.getParameter("theitemid");
        ItemList IL = null;
        ListGenerator lg = ListGenerator.getListGenerator(dataSource);
        IL = (ItemList)lg.getItemList(individualID, 1, 10, "", "ItemID");
       
        OrderForm orderForm = (OrderForm)form;
        orderForm.convertArrayToItemLines();
        orderForm.convertFormbeanToValueObject("edit");
       
        StringTokenizer st;
        String token, nextItr;
       
        if (newItemID != null) {
          st = new StringTokenizer(newItemID, ",");
          ItemLines itemLines = (orderForm).getItemLines();
          Integer intJurisdictionID = (orderForm).getJurisdictionID();
          int jurisdictionID = intJurisdictionID.intValue();
         
          if (itemLines == null) {
            itemLines = new ItemLines();
          }
          int counter = itemLines.size();
         
          while (st.hasMoreTokens()) {
            token = (String)st.nextToken();
            int intToken = Integer.parseInt(token);
           
            Iterator itr = IL.keySet().iterator();
            while (itr.hasNext()) {
              nextItr = (String)itr.next();
              ListElement ile = (ListElement)IL.get(nextItr);
              IntMember smid = (IntMember)ile.get("ItemID");
              Integer listItemid = (Integer)smid.getMemberValue();
             
              if (listItemid.intValue() == intToken) {
                StringMember smName = (StringMember)ile.get("Name"); // name = description
                String name = (String)smName.getMemberValue();
               
                StringMember smSku = (StringMember)ile.get("SKU");
                String sku = (String)smSku.getMemberValue();
                FloatMember dmprice = (FloatMember)ile.get("Price");
               
                float price = Float.parseFloat((dmprice.getMemberValue()).toString());
               
                int id = ile.getElementID();
               
                IntMember LineId = new IntMember("LineId", 0, 'D', "", 'T', false, 20);
                IntMember ItemId = new IntMember("ItemId", id, 'D', "", 'T', false, 20);
                IntMember Quantity = new IntMember("Quantity", 1, 'D', "", 'T', false, 20);
                FloatMember PriceEach = new FloatMember("Price", new Float(price), 'D', "", 'T', false, 20);
                StringMember SKU = new StringMember("SKU", sku, 'D', "", 'T', false);
                StringMember Description = new StringMember("Description", name, 'D', "", 'T', false);
                FloatMember PriceExtended = new FloatMember("PriceExtended", new Float(0.0f), 'D', "", 'T', false, 20);
                FloatMember TaxAmount = new FloatMember("TaxAmount", new Float(0.0f), 'D', "", 'T', false, 20);
View Full Code Here

    if (itemid != null) {
      for (int i = 0; i < itemid.length; i++) {

        ItemElement ie = new ItemElement();
        IntMember LineId = new IntMember("LineId", Integer.parseInt(lineid[i]), 'D', "", 'T',
            false, 20);
        IntMember ItemId = new IntMember("ItemId", Integer.parseInt(itemid[i]), 'D', "", 'T',
            false, 20);
        IntMember Quantity = new IntMember("Quantity", Integer.parseInt(quantity[i]), 'D', "", 'T',
            false, 20);
        priceeach[i] = priceeach[i].replaceAll(",", "");
        FloatMember PriceEach = new FloatMember("Price", new Float(priceeach[i]), 'D', "", 'T',
            false, 20);
        StringMember SKU = new StringMember("SKU", sku[i], 'D', "", 'T', false);
View Full Code Here

      while (it.hasNext()) {
        String lim = (String)it.next();
        ListElement ile = (ListElement)DL.get(lim);
        StringMember smName = (StringMember)ile.get("Name");
        String name = (String)smName.getMemberValue();
        IntMember smid = (IntMember)ile.get("IndividualID");
        int id = new Integer(smid.getMemberValue().toString()).intValue();
        // attendeeList.addElement(new DDNameValue(id,name));
        attendeeList.addElement(new DDNameValue("" + id + "#" + name, name));
      }
      put("attendee", attendeeList);
    } else if (listType.equals("allindividual")) {
      IndividualList DL = lg.getIndividualList(individualID, 0, 0, "", "Name");
      DL.setTotalNoOfRecords(DL.size());
      Set s = DL.keySet();
      Iterator it = s.iterator();
      while (it.hasNext()) {
        String lim = (String)it.next();
        ListElement ile = (ListElement)DL.get(lim);
        StringMember smName = (StringMember)ile.get("Name");
        String name = (String)smName.getMemberValue();
        IntMember smid = (IntMember)ile.get("IndividualID");
        int id = new Integer(smid.getMemberValue().toString()).intValue();
        // attendeeList.addElement(new DDNameValue(id,name));
        attendeeList.addElement(new DDNameValue("" + id + "#" + name, name));
      }
      put("allattendee", attendeeList);
    }
View Full Code Here

TOP

Related Classes of com.centraview.common.IntMember

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.