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

📄 updatepatientinfoaction.java

📁 一个小型的医疗管理系统
💻 JAVA
字号:
//Created by MyEclipse Struts//XSL source (default): platform:/plugin/com.genuitec.eclipse.cross.easystruts.eclipse_4.1.0/xslt/JavaClass.xslpackage com.yourcompany.struts.action;import java.sql.SQLException;import javax.servlet.http.HttpServletRequest;import javax.servlet.http.HttpServletResponse;import javax.servlet.http.HttpSession;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 bean.InPatient;import bean.NurseAdmin;import com.yourcompany.struts.form.UpdatePatientInfoForm;/** * MyEclipse Struts* Creation date: 01-18-2007* * XDoclet definition:* @struts.action path="/updatePatientInfo" name="updatePatientInfoForm" input="/form/updatePatientInfo.jsp" scope="request" validate="true"*/public class UpdatePatientInfoAction extends Action {	// --------------------------------------------------------- Instance Variables	// --------------------------------------------------------- Methods	/** 	 * Method execute	 * @param mapping	 * @param form	 * @param request	 * @param response	 * @return ActionForward	 * @throws SQLException 	 */	public ActionForward execute(		ActionMapping mapping,		ActionForm form,		HttpServletRequest request,		HttpServletResponse response) throws SQLException {		UpdatePatientInfoForm updatePatientInfoForm = (UpdatePatientInfoForm) form;		// TODO Auto-generated method stub		HttpSession session = request.getSession() ;		NurseAdmin nu = (NurseAdmin) session.getAttribute("nurseAdmin");		InPatient inpatient = (InPatient) session.getAttribute( "patient");		inpatient.setWaitDate(updatePatientInfoForm.getWaitDate());		inpatient.setStayIn(Integer.parseInt( updatePatientInfoForm.getStayIn()));		inpatient.setCondition(updatePatientInfoForm.getCondition() );		inpatient.setIn_date(updatePatientInfoForm.getIn_date()  );		inpatient.setOut_date( updatePatientInfoForm.getOut_date() );		inpatient.setTure_out_patient(updatePatientInfoForm.getTrue_out());		nu.UpdatePatient(inpatient.getPatientId(), inpatient);		session.setAttribute("message","patient update sucess");		return mapping.findForward("success");			}}

⌨️ 快捷键说明

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