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

📄 petmastermanager.java

📁 perfectpets的组织为全国的宠物诊所提供了个体健康管理。为不同城市的不同诊所提供了该服务。Perfectpets注意到在该业务领域缺乏交流
💻 JAVA
字号:
package com.pet.controller;

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.actions.DispatchAction;

import com.pet.actionform.MasterForm;
import com.pet.pojo.Petmaster;
import com.pet.proxy.PetmasterProxy;

public class PetmasterManager extends DispatchAction {

	PetmasterProxy masterProxy;
	
	public PetmasterProxy getMasterProxy() {
		return masterProxy;
	}

	public void setMasterProxy(PetmasterProxy masterProxy) {
		this.masterProxy = masterProxy;
	}
	
	public ActionForward add(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response)
			throws Exception {
		MasterForm mf=(MasterForm)form;
		Petmaster pm=new Petmaster(mf.getIdentityCard(),mf.getMasterId(),
								mf.getMasterName(),mf.getMasterAddress(),
								mf.getMasterTelephone(),null);
		masterProxy.SaveMaster(pm);
		request.setAttribute("msg", "主人信息记录保存成功!");
		request.setAttribute("master", pm);
		return mapping.findForward("ADD");
	}
	
}

⌨️ 快捷键说明

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