Package com.centraview.common

Examples of com.centraview.common.IntMember


            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(itr.hasNext())
          }   // end while(st.hasMoreTokens())

          for (int i = 0; i < removeKeys.size(); i++) {
            itemLines.remove(removeKeys.get(i));
          }
        }
       
        itemLines.calculate();
        proposalListForm.setItemLines(itemLines);
      }else 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");

        StringTokenizer st;
        String token, nextItr;

        if (newItemID != null) {
          st = new StringTokenizer(newItemID, ",");
          itemLines = proposalListForm.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);
                FloatMember TaxAmount = new FloatMember("TaxAmount", new Float(0.0f), 'D', "", 'T', false, 20);
View Full Code Here


   * @param elementId The new ID of this element.
   */
  public void setElementId(int elementId)
  {
    this.elementId = elementId;
    IntMember lineIdMember = (IntMember)this.get("LineId");
    if (lineIdMember != null)
    {
      lineIdMember.setMemberValue(elementId);
    } //end of if statement (lineIdMember != null)
  } //end of setElementId method
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 statement (status.equals("Active"))
                else if (status.equals("New")) {
                  removeKeys.add(obj);
                } // end of else if statement (status.equals("New"))
              } // end of if statement (currItemId.intValue() == removeToken)
            } // end of while loop (itr.hasNext())
          } // end of while loop (st.hasMoreTokens())

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

        OpportunityForm opportunityForm = (OpportunityForm) session.getAttribute("opportunityForm");
        request.setAttribute("opportunityForm", opportunityForm);
        session.setAttribute("opportunityForm", opportunityForm);

      } // end of else if statement
      // (viewOperation.equalsIgnoreCase(ProposalConstantKeys.REMOVEITEM))
      else if (viewOperation.equalsIgnoreCase(ProposalConstantKeys.ADDITEM)) {

        String newItemID = request.getParameter("theitemid");
        ItemList IL = null;
        ListGenerator lg = ListGenerator.getListGenerator(dataSource);
        IL = lg.getItemList(individualID, 1, 10, "", "ItemID");
        StringTokenizer st;
        String token, nextItr;

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

          if (itemLines == null)
            itemLines = new ItemLines();
          counter = itemLines.size();
          while (st.hasMoreTokens()) {
            token = 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

        int id = 0;
        int counter = 0;
       
        while (itr.hasNext()) {
          ItemElement ie2 = (ItemElement)itemLines.get(itr.next());
          IntMember LineId = (IntMember)ie2.get("LineId");
          IntMember ItemId = (IntMember)ie2.get("ItemId");
          StringMember SKU = (StringMember)ie2.get("SKU");
          StringMember Description = (StringMember)ie2.get("Description");
          IntMember Quantity = (IntMember)ie2.get("Quantity");
          FloatMember PriceEach = (FloatMember)ie2.get("Price");
          FloatMember PriceExtended = (FloatMember)ie2.get("PriceExtended");
          FloatMember taxAmount = (FloatMember)ie2.get("TaxAmount");
          com.centraview.account.common.ItemElement ie = new com.centraview.account.common.ItemElement(counter);
          ie.put("LineId", LineId);
View Full Code Here

  private void addPurchaseOrderItem(ItemElement ele ,int purchaseorderID)
  {
    CVDal dl = new CVDal(this.dataSource);
    try
    {
      IntMember lineid = ( IntMember )ele.get("LineId");
      IntMember itemid = ( IntMember )ele.get("ItemId");
      StringMember sku   = ( StringMember )ele.get("SKU");
      IntMember qty   = ( IntMember )ele.get("Quantity");
      FloatMember priceEach = ( FloatMember )ele.get("Price");
      StringMember desc   = ( StringMember )ele.get("Description");
      String status    = ele.getLineStatus();

      int quantity = ((Number) qty.getMemberValue()).intValue();
      float price =  ((Number) priceEach.getMemberValue()).floatValue();
      int itemID = ((Number)itemid.getMemberValue()).intValue();

      dl.setSql("purchaseorder.addpurchaseorderitem");
      dl.setInt(1,purchaseorderID);
View Full Code Here

  {
    CVDal dl = new CVDal(this.dataSource);
    try
    {

      IntMember lineid = ( IntMember )ele.get("LineId");
      IntMember itemid = ( IntMember )ele.get("ItemId");
      StringMember sku   = ( StringMember )ele.get("SKU");
      IntMember qty   = ( IntMember )ele.get("Quantity");
      FloatMember priceEach = ( FloatMember )ele.get("Price");
      StringMember desc   = ( StringMember )ele.get("Description");
      String status    = ele.getLineStatus();

      int quantity = ((Number) qty.getMemberValue()).intValue();
      float price =  ((Number) priceEach.getMemberValue()).floatValue();
      int itemID = ((Number)itemid.getMemberValue()).intValue();

      dl.setSql("purchaseorder.updatepurchaseorderitem");
      dl.setInt(1, itemID);
View Full Code Here

  private void markDeleatedPurchaseOrderItem(ItemElement ele ,int purchaseorderID)
  {
    CVDal dl = new CVDal(this.dataSource);
    try
    {
      IntMember lineid = ( IntMember )ele.get("LineId");
      String status    = ele.getLineStatus();

      dl.setSql("purchaseorder.markdeletedpurchaseorderitem");
      dl.setString(1,status);
      dl.setInt(2,((Integer)lineid.getMemberValue()).intValue() );
      dl.setInt(3,purchaseorderID);

      dl.executeUpdate();
      dl.clearParameters();
    }
View Full Code Here

          String sku = (String) hm.get("sku");
          String description = (String) hm.get("description");
          String status = (String) hm.get("status");
          float priceExtended = quantity * price;

          IntMember LineId = new IntMember("LineId",lineID,'D',"",'T',false,20);
          IntMember ItemId = new IntMember("ItemId",itemID,'D',"",'T',false,20);
          IntMember Quantity = new IntMember("Quantity",quantity,'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",description,'D',"",'T',false);
          FloatMember  PriceExtended = new FloatMember("PriceExtended",new Float(priceExtended),'D',"",'T',false,20);

View Full Code Here

   private void addApplyPayment(ItemElement ele ,int paymentID)
   {
      CVDal cvdal = new CVDal(this.dataSource);
    try
    {
       IntMember invoiceID = (IntMember)ele.get("InvoiceId");
       int invID = ( (Integer)invoiceID.getMemberValue()).intValue();

       DoubleMember appAmt = (DoubleMember)ele.get("AmountApplied");
       float amt = ( (Number)appAmt.getMemberValue()).floatValue();

       cvdal.setSql("account.payment.applypaymentinvoices");
View Full Code Here

   private void updateApplyPayment(ItemElement ele ,int paymentID)
   {
      CVDal cvdal = new CVDal(this.dataSource);
    try
    {
      IntMember invoiceID = (IntMember)ele.get("InvoiceId");
      int invID = ( (Integer)invoiceID.getMemberValue()).intValue();



      DoubleMember appAmt = (DoubleMember)ele.get("AmountApplied");
      float amt = ( (Double)appAmt.getMemberValue()).floatValue();
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.