예제 #1
0
 @Action(value = "save")
 public void save() throws Exception {
   SuccessOrFailure result = SuccessOrFailure.SUCCESS;
   try {
     purchaseItemService.saveOrModify(item);
   } catch (Exception e) {
     result = SuccessOrFailure.FAILURE;
     e.printStackTrace();
   }
   HttpUtils.write(JsonUtils.toJsonString(result));
 }
예제 #2
0
 @Action(value = "delete")
 public void delete() throws Exception {
   SuccessOrFailure result = SuccessOrFailure.SUCCESS;
   try {
     String id = getParameterFromRequest("id");
     purchaseItemService.delete(id);
   } catch (Exception e) {
     result = SuccessOrFailure.FAILURE;
     e.printStackTrace();
   }
   HttpUtils.write(JsonUtils.toJsonString(result));
 }