Example #1
0
 public String checkname() {
   if (this.brandManager.checkname(brand.getName(), brand.getBrand_id())) {
     this.json = "{result:1}"; // 存在返回1
   } else {
     this.json = "{result:0}";
   }
   return this.JSON_MESSAGE;
 }
Example #2
0
  public String save() {
    if (logo != null) {
      if (FileUtil.isAllowUp(logoFileName)) {

      } else {
        this.msgs.add("不允许上传的文件格式,请上传gif,jpg,bmp格式文件。");
        return this.MESSAGE;
      }
    }
    brand.setDisabled(0);
    brand.setFile(this.logo);
    brand.setFileFileName(this.logoFileName);
    brandManager.add(brand);
    this.msgs.add("品牌添加成功");
    this.urls.put("品牌列表", "brand!list.do");
    return this.MESSAGE;
  }