clientestimateaction.java
来自「一个简易的网上购物系统。具有普遍的购物功能。还有一个小型的论坛」· Java 代码 · 共 34 行
JAVA
34 行
/*
* Generated by MyEclipse Struts
* Template path: templates/java/JavaClass.vtl
*/
package com.longHua.web.struts;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.validator.DynaValidatorForm;
import com.longHua.domain.ClientEstimate;
import com.longHua.util.TimeNow;
public class ClientEstimateAction extends BaseAction {
public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) {
DynaValidatorForm clientEstimateForm = (DynaValidatorForm) form;// TODO Auto-generated method stub
//首先这里需要判断用户是否已登陆和验证码是否正确,如果有以个错误则发表失败,返回到发表页面,这以后增加
//下面主要是数据库操作
ClientEstimate clientEstimate=new ClientEstimate();
clientEstimate.setUid(8);
clientEstimate.setProductId(8);
clientEstimate.setEsTitle(clientEstimateForm.getString("esTitle"));
clientEstimate.setEsContent(clientEstimateForm.getString("esContent"));
clientEstimate.setEsTime(TimeNow.getNowTime());
clientEstimate.setCheckNot("Y");
getLongHua().addClientEstimate(clientEstimate);
return mapping.findForward("success");
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?