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

📄 updatecaraction.java

📁 老牌java开发的物流管理系统 详细的我也没有怎么看 好像是恒基的
💻 JAVA
字号:
package com.wl.actionimpl;

import java.io.UnsupportedEncodingException;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.wl.action.Action;
import com.wl.dao.CarmanagerDAO;
import com.wl.entity.Carmanage;

public class UpdateCarAction implements Action {

	public String doExcute(HttpServletRequest request,
			HttpServletResponse response) {
		
		try {
			request.setCharacterEncoding("UTF-8");
		} catch (UnsupportedEncodingException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		String tid = request.getParameter("tid");
		int id = Integer.parseInt(tid);
		String cardid = request.getParameter("cardid");
		String carDriverId = request.getParameter("carDriverId");
		int t = Integer.parseInt(carDriverId);
		String teamid = request.getParameter("teamid");
		int m = Integer.parseInt(teamid);
		Carmanage car = new Carmanage();
		car.setId(id);
		car.setCardId(cardid);
		car.setCarDriverId(t);
		car.setCarTeamId(m);
		CarmanagerDAO dao = new CarmanagerDAO();
		int a = dao.updateCar(car);
		if(a!=0) {
			return "/wangjianwei/showcar.jsp";
		}
		else{
			return "/wangjianwei/upaddcarerror.jsp";
		}
	}

}

⌨️ 快捷键说明

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