src/com/jiudai/action/SupplyerAction.java
(完整代码) 1KBpackage com.jiudai.action;
import com.jiudai.dao.SupplyerDAO;
import com.jiudai.domain.Supplyer;
import com.opensymphony.xwork2.ActionContext;
public class SupplyerAction {
private Supplyer supplyer;
public void setSupplyer(Supplyer supplyer) {
this.supplyer = supplyer;
}
private SupplyerDAO supplyerDAO = new SupplyerDAO();
public Supplyer getSupplyer() {
return supplyer;
}
public String AddSupplyer() {
ActionContext ctx = ActionContext.getContext();
try {
supplyerDAO.AddSupplyer(supplyer);
ctx.put("result", "供应商信息添加成功!");
} catch (Exception ex) {
ctx.put("result", "供应商信息添加失败!");
}
return "supplyer_add_view";
}
/*修改供应商信息*/
public String ModifySupplyer() {
ActionContext ctx = ActionContext.getContext();
try {
supplyerDAO.ModifySupplyer(supplyer);
ctx.put("message", "供应商信息修改成功!");
} catch(Exception ex) {
System.out.println(ex.getMessage());
ctx.put("message", "供应商信息修改失败!");
}
return "message";
}
/*删除供应商信息*/
public String DeleteSupplyer() {
ActionContext ctx = ActionContext.getContext();
try {
supplyerDAO.DeleteSupplyer(supplyer);
ctx.put("result", "供应商信息删除成功!");
} catch(Exception ex) {
ctx.put("result", "供应商信息删除失败!");
}
return "supplyer_manage_view";
}
}
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。
