src/com/jiudai/action/CarNameAction.java
(完整代码) 1KBpackage com.jiudai.action;
import com.jiudai.dao.CarNameDAO;
import com.jiudai.domain.CarName;
import com.opensymphony.xwork2.ActionContext;
public class CarNameAction {
/*接收web层传递来的汽车名称信息*/
private CarName carName;
/*操作汽车名称信息的业务层对象*/
private CarNameDAO carNameDAO = new CarNameDAO();
public CarName getCarName() {
return carName;
}
public void setCarName(CarName carName) {
this.carName = carName;
}
public String AddCarName() {
ActionContext ctx = ActionContext.getContext();
try {
carNameDAO.AddCarName(carName);
ctx.put("result", "汽车名称信息添加成功!");
} catch (Exception ex) {
ctx.put("result", "汽车名称信息添加失败!");
}
return "carname_manage_view";
}
public String DeleteCarName() {
ActionContext ctx = ActionContext.getContext();
try {
carNameDAO.DeleteCarName(carName.getId());
ctx.put("result", "客户信息删除成功!");
} catch(Exception ex) {
ctx.put("result", "客户信息删除失败!");
}
return "carname_manage_view";
}
}
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。
