⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ggtxl_addaction.java

📁 一段很有意义的源码,看了就知道,不信试一试啊!
💻 JAVA
字号:
/*
 * Generated by MyEclipse Struts
 * Template path: templates/java/JavaClass.vtl
 */
package com.wondersgroup.txl.web.Action;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

import com.wondersgroup.txl.bo.GgTxlBo;
import com.wondersgroup.txl.service.GgTxlService;
import com.wondersgroup.txl.web.Form.GgTxl_AddForm;
import java.util.Date;
import java.text.ParseException;
import java.text.SimpleDateFormat;

/** 
 * MyEclipse Struts
 * Creation date: 07-04-2007
 * 
 * XDoclet definition:
 * @struts.action path="/ggTxl_Add" name="ggTxl_AddForm" input="/txl/gg_txl_xinzeng.jsp" scope="request" validate="true"
 */
public class GgTxl_AddAction extends Action {
	private GgTxlService ggTxlService;
	
	/*
	 * Generated Methods
	 */

	public GgTxlService getGgTxlService() {
		return ggTxlService;
	}


	public void setGgTxlService(GgTxlService ggTxlService) {
		this.ggTxlService = ggTxlService;
	}


	/** 
	 * Method execute
	 * @param mapping
	 * @param form
	 * @param request
	 * @param response
	 * @return ActionForward
	 */
	public ActionForward execute(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response)  throws ParseException{
		GgTxl_AddForm add = (GgTxl_AddForm) form;// TODO Auto-generated method stub
		GgTxlBo ggTxlBo = new GgTxlBo();
		ggTxlBo.setXm(add.getXm());
		
		Date date = null;
		SimpleDateFormat fordate = new SimpleDateFormat("yyyy-MM-dd");
		date = fordate.parse(add.getSr());
		ggTxlBo.setSr(date);
		
		ggTxlBo.setXlt(add.getXlt());
		ggTxlBo.setYdsj(add.getYdsj());
		ggTxlBo.setYdwh(add.getYdwh());
		ggTxlBo.setDwdz(add.getDwdz());
		ggTxlBo.setDw(add.getDw());
		ggTxlBo.setZw(add.getZw());
		ggTxlBo.setDwdh(add.getDwdh());
		ggTxlBo.setJtdz(add.getJtdz());
		ggTxlBo.setJtdh(add.getJtdh());
		ggTxlBo.setPy(add.getPy());
		ggTxlBo.setEmail(add.getEmail());
		ggTxlBo.setFdwid(add.getFdwid());
		ggTxlBo.setLtsj(add.getLtsj());
		ggTxlBo.setLtwh(add.getLtwh());
		ggTxlBo.setBm(add.getBm());
		ggTxlBo.setDwyb(add.getDwyb());
		ggTxlBo.setDwcz(add.getDwcz());
		ggTxlBo.setJtyb(add.getJtyb());
		ggTxlBo.setTxltype(add.getTxltype());
		
		ggTxlService.addContractGgInfo(ggTxlBo);
		request.setAttribute("id", String.valueOf(add.getFdwid()));
		request.setAttribute("action", "add");
		return mapping.findForward("addGgTxl");
	}
}

⌨️ 快捷键说明

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