1. 功能介绍

    删除数据

  2. 开发步骤

    1. 编写HTML表单
    2. 编写页面Java事件
    3. 编写Java Bean方法
  3. 代码片段

    1. 配置文件代码

    2. HTML写法(参考quickstart/web/examples/basic/VipcustList.html)

      <a jwcid="@wade:PageSubmit"
      value="删除"
      listener="ognl:listeners.deleteVipcust"
      desc="VIP客户资料"
      class="e_bLinkDelete"
      onclick="return queryBox(this, 'vips');"/>
      
    3. JAVA(PAGE)写法(参考quickstart/src/doc/../examples/basic/ExamplesBean.java)

      /**
       * 删除VIP客户资料
       * @param cycle
       * @throws Exception
       */
      public void deleteVipcust(IRequestCycle cycle) throws Exception {
      	PageData pd = getPageData();
      	
      	ExamplesBean bean = new ExamplesBean();
      	if (!bean.deleteVipcust(pd, pd.getParameter("VIP_ID"), pd.getParameter("REMOVE_TAG"))) 
      		common.error("删除失败,信息在此操作前已经被操作过");
      	
      	redirectToMsg("VIP客户资料删除成功");
      }
      
    4. JAVA(BEAN)写法(参考quickstart/src/doc/../examples/basic/ExamplesBean.java)

      /**
       * 删除VIP客户资料并根据传入的编号、注销标记判断是否能够删除(注销后不能再删除)
       * @param pd
       * @param vip_id
       * @param remove_tag
       * @throws Exception
       */
      public boolean deleteVipcust(PageData pd, String vip_id, String remove_tag) throws Exception {	    
      	ExamplesDAO dao = new ExamplesDAO(pd);
      	
      	IData data = new DataMap();
      	data.put("VIP_ID", vip_id);
      	data.put("REMOVE_TAG", remove_tag);
      	return dao.delete("TF_F_CUST_VIP", data, new String[] {"VIP_ID","REMOVE_TAG"}); //指定主键的名称删除表数据
      }
      

      说明:同修改信息中可以绑定指定列进行删除,如:
      dao.delete("TF_F_CUST_VIP", data, new String[] { "VIP_ID", "REMOVE_TAG" });