Пример #1
0
 /**
  * @param arrList
  * @return
  */
 private StringMatrix ConvertToStrMatrix(ArrayList arrList) {
   int nSize = arrList.size() + 1; // TrangTK
   StringMatrix mtxList = new StringMatrix(nSize, 7); // Modified by HaiMM: 4 --> 6
   Iterator it = arrList.iterator();
   // String strCode = "";
   // String strName = "";
   String strAllValue = "";
   StringBuffer strTemp = new StringBuffer(); // Modified by HaiMM
   // All project - TrangTK
   int i = 0;
   mtxList.setCell(i, 0, "0");
   mtxList.setCell(i, 1, "All");
   mtxList.setCell(i, 2, "All");
   i++;
   while (it.hasNext()) {
     ProjectComboModel clmData = (ProjectComboModel) it.next();
     mtxList.setCell(i, 0, clmData.getID());
     // TrangTK
     mtxList.setCell(i, 1, clmData.getCode());
     mtxList.setCell(i, 2, clmData.getName());
     mtxList.setCell(i, 3, clmData.getGroup());
     mtxList.setCell(i, 4, clmData.getStatus());
     mtxList.setCell(i, 5, clmData.getStartdate()); // Modified by HaiMM
     mtxList.setCell(i, 6, clmData.getPlanStartdate()); // Modified by HaiMM
     strTemp.append(clmData.getID() + ","); // Modified by HaiMM
     i++;
   }
   strAllValue = strTemp.toString(); // Modified by HaiMM
   if (strAllValue.length() > 1) {
     strAllValue = strAllValue.substring(0, strAllValue.length() - 1);
     mtxList.setCell(0, 0, strAllValue);
   }
   return mtxList;
 }
Пример #2
0
 /**
  * @param arrList
  * @return
  */
 private StringMatrix StatusListToStrMatrix(ArrayList arrList) {
   int nSize = arrList.size() + 1;
   StringMatrix mtxList = new StringMatrix(nSize, 2);
   Iterator it = arrList.iterator();
   //		String strAllValue = ""; -- by HaiMM
   int i = 0;
   mtxList.setCell(i, 0, Integer.toString(Timesheet.PROJECT_STATUS_ALL));
   mtxList.setCell(i, 1, Timesheet.PROJECT_STATUS_ALL_STR);
   i++;
   while (it.hasNext()) {
     ProjectComboModel clmData = (ProjectComboModel) it.next();
     mtxList.setCell(i, 0, clmData.getID());
     mtxList.setCell(i, 1, clmData.getName());
     //			strAllValue += clmData.getID() + ","; -- by HaiMM
     i++;
   }
   return mtxList;
 }