Пример #1
0
 public void del() {
   String Codes = $V("Codes");
   if ((Codes.indexOf("\"") >= 0) || (Codes.indexOf("'") >= 0)) {
     this.response.setStatus(0);
     this.response.setMessage("传入ID时发生错误!");
     return;
   }
   Codes = XString.replaceEx(Codes, ",", "','");
   Transaction trans = new Transaction();
   ZDMemberFieldSchema field = new ZDMemberFieldSchema();
   ZDMemberFieldSet set =
       field.query(
           new QueryBuilder(
               "where SiteID = "
                   + ApplicationPage.getCurrentSiteID()
                   + " and Code in ('"
                   + Codes
                   + "')"));
   trans.add(set, OperateType.DELETE);
   if (trans.commit()) {
     this.response.setStatus(1);
     this.response.setMessage("删除成功!");
   } else {
     this.response.setStatus(0);
     this.response.setMessage("操作数据库时发生错误!");
   }
 }
Пример #2
0
 public static ZDMemberSchema setPropValues(ZDMemberSchema member, Mapx map, String SiteID) {
   ZDMemberFieldSchema field = new ZDMemberFieldSchema();
   ZDMemberFieldSet set = field.query(new QueryBuilder(" where SiteID = ?", SiteID));
   for (int i = 0; i < set.size(); i++) {
     String Value = "";
     String RealField = "";
     String Code = "";
     field = new ZDMemberFieldSchema();
     field = set.get(i);
     Code = field.getCode();
     RealField = field.getRealField();
     Value = map.getString("_MC_" + Code);
     map.put(RealField, Value);
   }
   member.setValue(map);
   return member;
 }