Package com.centraview.common

Examples of com.centraview.common.IntMember


        int projectID = ((Long)hm.get("ProjectID")).intValue();

        StringMember description, projectName = null, taskName = null, createdBy = null;
        PureDateMember date = null;
        PureTimeMember startTime = null, endTime = null;
        IntMember creator, taskId;

        IntMember intmem = new IntMember("ID", timeSlipID, 10, "URL", 'T', true, 10);
        IntMember projectId1 = new IntMember("ProjectID", projectID, 10, "URL", 'T', true, 10);

        Time tStartTime = (Time)hm.get("Start");
        Time tEndTime = (Time)hm.get("End");

        java.util.Date dt = (java.util.Date)hm.get("Date");

        Calendar calendarStart = Calendar.getInstance();
        calendarStart.set(dt.getYear(), dt.getMonth(), dt.getDay(), tStartTime.getHours(),
            tStartTime.getMinutes());

        Calendar calendarEnd = Calendar.getInstance();
        calendarEnd.set(dt.getYear(), dt.getMonth(), dt.getDay(), tEndTime.getHours(), tEndTime
            .getMinutes());

        long startMili = calendarStart.getTimeInMillis();
        long endMili = calendarEnd.getTimeInMillis();

        long diff = endMili - startMili;
        Time difTime = new Time(diff);
        int startHrs = calendarStart.get(Calendar.HOUR_OF_DAY);// startHrsmm[0];
        int startMins = calendarStart.get(Calendar.MINUTE);// startHrsmm[1];

        int endHrs = calendarEnd.get(Calendar.HOUR_OF_DAY);// endHrsmm[0];
        int endMins = calendarEnd.get(Calendar.MINUTE);// endHrsmm[1];

        float Duration = 0;

        Double dBreakTime = (Double)hm.get("BreakTime");
        float BreakTime = dBreakTime.floatValue();
        float remMin = 0;

        if (startMins != 0 && endMins != 0 && startMins != endMins) {
          if (endMins > startMins)
            remMin = 60 / (endMins - startMins);
          else
            remMin = 60 / (startMins - endMins);
        }

        Duration = (endHrs - startHrs) + remMin - BreakTime;

        StringMember duration = new StringMember("Duration", Float.toString(Duration), 10, "URL",
            'T', false);

        if (hm.get("Description") != null)
          description = new StringMember("Description", (String)hm.get("Description"), 10, "", 'T',
              false);
        else
          description = new StringMember("Description", "", 10, "", 'T', false);

        if (hm.get("ProjectTitle") != null)
          projectName = new StringMember("Project", (String)hm.get("ProjectTitle"), 10, "URL", 'T',
              true);
        else
          projectName = new StringMember("Project", "", 10, "URL", 'T', true);

        if (hm.get("title") != null)
          taskName = new StringMember("Task", (String)hm.get("title"), 10, "URL", 'T', true);
        else
          taskName = new StringMember("Task", "", 10, "URL", 'T', true);

        if (hm.get("activityid") != null)
          taskId = new IntMember("TaskID", ((Integer)hm.get("activityid")).intValue(), 10, "URL",
              'T', true, 10);
        else
          taskId = new IntMember("TaskID", 0, 10, "URL", 'T', true, 10);

        String firstName = (String)hm.get("FirstName");
        String lastName = (String)hm.get("LastName");

        String created = (firstName != null ? firstName + " " : "")
            + (lastName != null ? lastName : "");

        if (!created.equals(""))
          createdBy = new StringMember("CreatedBy", created, 10, "", 'T', true);
        else
          createdBy = new StringMember("CreatedBy", "", 10, "", 'T', true);

        if (hm.get("CreatedBy") != null)
          creator = new IntMember("Creator", ((Integer)hm.get("CreatedBy")).intValue(), 10, "URL",
              'T', false, 10);
        else
          creator = new IntMember("Creator", 0, 10, "URL", 'T', false, 10);

        if (hm.get("Date") != null)
          date = new PureDateMember("Date", (java.util.Date)hm.get("Date"), 10, "URL", 'T', false,
              100, "EST");
        else
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") || status.equals(""))
                {
                  ILE.setLineStatus("Deleted");
                  removeKeys.add(obj);
                }
                else  if (status.equals("New"))
                {

                   removeKeys.add(obj);
                }
              }
            }
          }

          for(int i=0; i<removeKeys.size(); i++)
          {
            itemLines.remove(removeKeys.get(i));
          }
        }

          ((PromotionDetailListForm)form).setItemLines(itemLines);
      }


      //  ADD item

      else if ( (request.getParameter(AccountConstantKeys.TYPEOFOPERATION) != null) && request.getParameter(AccountConstantKeys.TYPEOFOPERATION).equals("ADDITEM") )
      {
      // added by Sandie for handling custom field values
      request.setAttribute("CustomFieldVector",customFieldVec);
      // added by Sandie - end
      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;
      Iterator itr = IL.keySet().iterator();

      if (newItemID != null)
      {
        st = new StringTokenizer(newItemID, ",");
        itemLines = ((PromotionDetailListForm)form).getItemLines();
        if(itemLines == null)
          itemLines = new ItemLines();
        counter = itemLines.size();
        while (st.hasMoreTokens())
        {
          token   = (String)st.nextToken();
          int intToken = Integer.parseInt(token);

          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 smType = (StringMember)ile.get("Type"); // type
              String type = (String) smType.getMemberValue();

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

              FloatMember smPrice  = (FloatMember) ile.get("Price");

              float dprice = Float.parseFloat((smPrice.getMemberValue()).toString());

              FloatMember smCost  = (FloatMember) ile.get("Price");

              float dcost = Float.parseFloat((smCost.getMemberValue()).toString());

              int id = ile.getElementID();

              IntMember LineId = new IntMember("LineId",11,10,"",'T',false,20);
              IntMember ItemId = new IntMember("ItemId",id,10,"",'T',false,20);
              StringMember SKU = new StringMember("SKU",sku,10,"",'T',false);
              StringMember Description = new StringMember("Description",name,10,"",'T',false);
              FloatMember  Quantity = new FloatMember("Quantity",new Float(0.0f),10,"",'T',false,20);
              FloatMember  PriceEach = new FloatMember("PriceEach",new Float(0.0f),10,"",'T',false,20);
              FloatMember  PriceExtended = new FloatMember("PriceExtended",new Float(0.0f),10,"",'T',false,20);
              FloatMember  UnitTax = new FloatMember("UnitTax",new Float(0.0f),10,"",'T',false,20);
              FloatMember  TaxRate = new FloatMember("UnitTaxrate",new Float(0.0f),10,"",'T',false,20);
              FloatMember  OrderQuantity = new FloatMember("OrderQuantity",new Float(0.0f),10,"",'T',false,20);
              FloatMember  PendingQuantity = new FloatMember("PendingQuantity",new Float(0.0f),10,"",'T',false,20);
              IntMember   Value = new IntMember("Value",0,10,"",'T',false,20);
              StringMember Type = new StringMember("Type",type,10,"",'T',false);
              FloatMember  DiscountedPrice = new FloatMember("DiscountedPrice",new Float(0.0f),10,"",'T',false,20);
              FloatMember  price = new FloatMember( "Price"  ,new Float(dprice) , 10 , "", 'T' , false , 10 );
              FloatMember cost  = new FloatMember( "Cost"  ,new Float(dcost) , 10 , "", 'T' , false , 10 );
View Full Code Here

            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();
                //              DoubleMember dmprice  = (DoubleMember) ile.get("Price");
                FloatMember dmprice = (FloatMember)ile.get("Price");
                float price = ((Float)dmprice.getMemberValue()).floatValue();
                int id = ile.getElementID();

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

                FloatMember Amount = new FloatMember("Amount", new Float(0.0f), 'D', "", 'T', false, 20);
                StringMember Reference = new StringMember("Reference", new String(), 'D', "", 'T', false);

                IntMember ReferenceType = new IntMember("ReferenceType", 100, 'D', "", 'T', false, 20);
                IntMember ReferenceId = new IntMember("ReferenseId", 100, 'D', "", 'T', false, 20);

                HrExpenseLineElement ie = new HrExpenseLineElement(11);

                ie.put("LineId", LineId);
                ie.put("ExpenseItemID", ItemId);
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

        cost = new String[1];
        cost[i] = "0.0";
      }
      System.out.println("################ "+cost[i]+" ####################");
*/
      IntMember     LineId = null;

      // Defaulting to costDollarLayer Coz We are not going to use it right now..
      // Remove this line and remove the commented block in /jsp/marketing/ItemList.jsp
      // String type[] = new String[itemid.length];
      type[i] = "costDollarLayer";


      if (!lineid[i].equals(""))
      LineId = new IntMember("LineId",Integer.parseInt(lineid[i]),10,"",'T',false,20);
      IntMember     ItemId = new IntMember("ItemId",Integer.parseInt(itemid[i]),10,"",'T',false,20);
      StringMember   SKU = new StringMember("SKU",sku[i],10,"",'T',false);
      StringMember   Description = new StringMember("Description",description[i],10,"",'T',false);
      /*FloatMember   Quantity = new FloatMember("Quantity",new Float(quantity[i]),10,"0",'T',false,20);
      FloatMember   PriceEach = new FloatMember("PriceEach",new Float(priceeach[i]),10,"",'T',false,20);
      FloatMember   PriceExtended = new FloatMember("PriceExtended",new Float(priceExtended[i]),10,"",'T',false,20);*/
      FloatMember   UnitTax = new FloatMember("UnitTax",new Float(unittax[i]),10,"",'T',false,20);
      FloatMember   TaxRate = new FloatMember("UnitTaxrate",new Float(taxrate[i]),10,"",'T',false,20);
      FloatMember   OrderQuantity = new FloatMember("OrderQuantity",new Float(orderquantity[i]),10,"",'T',false,20);
      FloatMember   PendingQuantity = new FloatMember("PendingQuantity",new Float(pendingquantity[i]),10,"",'T',false,20);
      IntMember     Value = new IntMember("Value",Integer.parseInt(value[i]),10,"",'T',false,20);
      StringMember   Type = new StringMember("Type",type[i],10,"",'T',false);
      FloatMember   DiscountedPrice = new FloatMember("DiscountedPrice",new Float(strDiscoountprice),10,"",'T',false,20);
      /*DoubleMember   ListPrice = new FloatMember("ListPrice",new Float(listprice[i]),10,"",'T',false,20);
      FloatMember   Cost = new FloatMember("Cost",new Float(cost[i]),10,"",'T',false,20);
      */
 
View Full Code Here


      String str = ( String )it.next();
      StringMember sm=null;
          ListElement ele  = ( ListElement )DL.get( str );
      IntMember im = ( IntMember )ele.get("ID" );

      if (im != null)
      {
          expFormID = ((Integer)im.getMemberValue()).intValue();
      }
      else
      {
      }


      im.setRequestURL("goTo('NewHRExpense.do?rowId="+ele.getElementID()+"&expenseFormID="+expFormID+"')");

      sm = ( StringMember )ele.get("Employee" );
      im = (IntMember) ele.get("EmployeeID");
      sm.setRequestURL("openPopup('ViewIndividualDetail.do?rowId="+im.getMemberValue()+"&listId="+DL.getListID()+"')");

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

  }
View Full Code Here

        int i = 0;
        while (iter.hasNext()) {
          i++;
          HashMap row = (HashMap)iter.next();
          int ruleID = ((Number)row.get("ruleID")).intValue();
          IntMember ruleIDfield = new IntMember("RuleID", ruleID, 10, "", 'T', true, 10);
          StringMember name = new StringMember("RuleName", (String)row.get("name"), 10, "", 'T', true);
          StringMember description = new StringMember("Description", (String)row.get("description"), 10, "", 'T', false);
          StringMember enabled = new StringMember("EnabledStatus", (String)row.get("enabled"), 10, "", 'T', false);

          RuleListElement ele  = new RuleListElement(ruleID);
View Full Code Here

        // "+sortType+" LIMIT "+(beginIndex-1)+ ", "+(endIndex+1));
        i++;
        HashMap hm = (HashMap)it.next();
        int spID = ((Long)hm.get("ProfileID")).intValue();
        try {
          IntMember intProfleID = new IntMember("ProfileID", spID, 10, "", 'T', false, 10);
          StringMember strProfileName = null;
          IntMember intUserCount = null;
          if ((hm.get("ProfileName") != null))
            strProfileName = new StringMember("ProfileName", (String)hm.get("ProfileName"), 10, "", 'T', true);
          else
            strProfileName = new StringMember("ProfileName", null, 10, "", 'T', true);
          if ((hm.get("NoOfUsers") != null))
            if (hm.get("NoOfUsers") instanceof Long)
              intUserCount = new IntMember("NoOfUsers", ((Long)hm.get("NoOfUsers")).intValue(), 10, "", 'T', false, 10);
            else
              intUserCount = new IntMember("NoOfUsers", ((Integer)hm.get("NoOfUsers")).intValue(), 10, "", 'T', false, 10);
          else
            intUserCount = new IntMember("NoOfUsers", 0, 10, "", 'T', false, 10);
          SecurityProfileListElement splistelement = new SecurityProfileListElement(spID);
          splistelement.put("ProfileID", intProfleID);
          splistelement.put("ProfileName", strProfileName);
          splistelement.put("NoOfUsers", intUserCount);
          StringBuffer stringbuffer = new StringBuffer("00000000000");
View Full Code Here

      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);
        quantity[i] = quantity[i].replaceAll(",","");
        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

            lineStatus = "";
          } //end of if statement (lineStatus == null)

               if (!lineStatus.equals("Deleted")) {

          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");
          FloatMember priceExe = (FloatMember)ele.get("PriceExtended");

          StringMember desc  = (StringMember)ele.get("Description");
          FloatMember taxAmount = (FloatMember)ele.get("TaxAmount");

          String quantity;
          String priceEachString;
          try
          {
            float tempFloat = (currencyFormat.parse(qty.getDisplayString())).floatValue();
            quantity = wholeNumberFormat.format(new Float(tempFloat));
          } //end of try block
          catch (Exception exception)
          {
            quantity = "0";
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.