예제 #1
0
 public void ProcessGoodsTypeTNList(List<GoodsTypeTN> list) {
   for (Iterator<GoodsTypeTN> it = list.iterator(); it.hasNext(); ) {
     GoodsTypeTN gtn = (GoodsTypeTN) it.next();
     Map<String, Object> cellMap = new HashMap<String, Object>();
     cellMap.put("id", gtn.getGoodsTypeId());
     cellMap.put(
         "cell",
         new Object[] {
           gtn.getName(),
           BaseTools.formateDbDate(gtn.getCreatetime()),
           "<a id='editegoodstypetn' name='editegoodstypetn' href='goodstypetn.jsp?operate=edit&folder=goods&goodsTypeId="
               + gtn.getGoodsTypeId()
               + "'>[编辑]</a>"
         });
     rows.add(cellMap);
   }
 }
예제 #2
0
 @Action(
     value = "findGoodsTypeTNForSelect",
     results = {@Result(name = "json", type = "json")})
 public String findGoodsTypeTNForSelect() {
   this.setGoodstypetnlist("");
   List<GoodsTypeTN> list = this.getGoodsTypeTNService().findAllGoodsTypeTNNopage();
   if (list != null) {
     this.setGoodstypetnlist("<option value='0'>---请选择---</option>");
     for (Iterator<GoodsTypeTN> it = list.iterator(); it.hasNext(); ) {
       GoodsTypeTN gtn = (GoodsTypeTN) it.next();
       this.goodstypetnlist +=
           "<option value='" + gtn.getGoodsTypeId() + "'>" + gtn.getName() + "</option>";
     }
     this.setGoodstypetnlist(goodstypetnlist);
     return "json";
   }
   this.setGoodstypetnlist("");
   return "json";
 }