citydispaction.java

来自「一个很不错的电子商务后台管理系统 这是一个电子商务网站的后台管理系统 要」· Java 代码 · 共 76 行

JAVA
76
字号
package xian.bin.city;import org.apache.struts.action.*;import javax.servlet.http.*;import xian.bin.serivce.*;public class CityDispAction extends BaseCityDispAction {  //添加市  public ActionForward addCity(ActionMapping actionMapping, ActionForm actionForm, HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) {    CityForm cityForm = (CityForm) actionForm;    Object[] obj=null;    ServiceCity service=null;    try{      service=this.getServiceCity();      obj[0]=new Integer(cityForm.getSheng());      obj[1]=new Integer(cityForm.getCno());      obj[2]=new Integer(cityForm.getCorder());      service.addCity(obj);      System.out.println("添加市");    }    catch(Exception e){      e.printStackTrace();    }    throw new java.lang.UnsupportedOperationException("Method perform() not yet implemented.");  }  //删除一个市信息  public ActionForward delCity(ActionMapping actionMapping, ActionForm actionForm, HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) {    CityForm cityForm = (CityForm) actionForm;    ServiceCity service=null;    try{      service=this.getServiceCity();      service.delCity(cityForm.getCid());      System.out.println("删除一个市信息");    }    catch(Exception e){      e.printStackTrace();    }    throw new java.lang.UnsupportedOperationException("Method perform() not yet implemented.");  }  //获得所有市信息  public ActionForward getAllCity(ActionMapping actionMapping, ActionForm actionForm, HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) {    CityForm cityForm = (CityForm) actionForm;    ServiceCity service=null;    try{      service=this.getServiceCity();      cityForm.setCitys(service.getAllCity());      System.out.println("获得所有市信息");    }    catch(Exception e){      e.printStackTrace();    }    throw new java.lang.UnsupportedOperationException("Method perform() not yet implemented.");  }  //修改一个市信息  public ActionForward updataCity(ActionMapping actionMapping, ActionForm actionForm, HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) {    CityForm cityForm = (CityForm) actionForm;    Object[] obj=null;    ServiceCity service=null;    try{      service=this.getServiceCity();      obj[0]=new Integer(cityForm.getSheng());      obj[1]=new Integer(cityForm.getCno());      obj[2]=new Integer(cityForm.getCorder());      service.updataCity(obj);      System.out.println("添加市");    }    catch(Exception e){      e.printStackTrace();    }    throw new java.lang.UnsupportedOperationException("Method perform() not yet implemented.");  }}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?