/*
 * Generated by MyEclipse Struts
 * Template path: templates/java/JavaClass.vtl
 */
package com.yuntong.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.yuntong.action.actionform.J_ShaoShouKuanForm;
import com.yuntong.business.vo.J_ShaoVO;
import com.yuntong.hibernate.database.po.TAgioInfo;
import com.yuntong.hibernate.database.po.TAgioType;
import com.yuntong.hibernate.database.po.TRegisterInfo;
import com.yuntong.service.J_ShaoShouKuanService;

/** 
 * MyEclipse Struts
 * Creation date: 04-08-2007
 * 
 * XDoclet definition:
 * @struts.action validate="true"
 */
public class J_ShaoShouKuanAction extends Action {
	private J_ShaoShouKuanService kuanService ;
	/*
	 * Generated Methods
	 */

	/** 
	 * Method execute
	 * @param mapping
	 * @param form
	 
	 * @return ActionForward
	 */
	public ActionForward execute(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response) {
		J_ShaoShouKuanForm  shaoShouKuanForm=(J_ShaoShouKuanForm) form; 
		
		int id=	shaoShouKuanForm.getAgioID();
       int type=shaoShouKuanForm.getAgioTypeID();
		int rid=shaoShouKuanForm.getAgioGoodsID();
		float money=shaoShouKuanForm.getAgioMoney();
	      String info=shaoShouKuanForm.getAgioInfo();
		
	      TAgioType Type=new TAgioType();
	      Type.setAtypeId(type);
	
		

	      TAgioInfo shaoVO=new TAgioInfo();
	      shaoVO.setTAgioType(Type);
		shaoVO.setAgioId(id);
		TRegisterInfo rinfo=new TRegisterInfo();
		rinfo.setRegisterId(rid);
		shaoVO.setTRegisterInfo(rinfo);
		shaoVO.setAgioMoney(money);
		shaoVO.setAgioInfo(info);
		kuanService.SaveShaoShouKuan(shaoVO);
		
	
	return mapping.findForward("index");
	}

	public J_ShaoShouKuanService getKuanService() {
		return kuanService;
	}

	public void setKuanService(J_ShaoShouKuanService kuanService) {
		this.kuanService = kuanService;
	}
}