JSP:

<html>
  <head>
    <title>登录</title>
   <style type="text/css">
       table{
         color: blue;
         font-weight: bold;
         text-align: center;
         border-color: #C1DCF9;
       }
    </style>
  </head>
 
  <body>
    <form action="<%=request.getContextPath()%>/equipOut.do" method="post">
    <table border="1">
      <tr>
       <td>客户编号</td>
       <td><input type="text" name="userno"></td>
       <td>客户名称</td>
       <td><input type="text" name="username"></td>
      </tr>
      <tr>
         <td>经办人</td>
         <td><input type="text" name="people"></td>
         <td>出库日期</td>
         <td><input type="text" name="date"></td>
      </tr>
      <tr>
          <td>设备编号</td>
       <td>设备种类</td>
       <td>备注</td>
       <td>操作</td>
      </tr>
      <tr>
          <td><input type="text" name="equipno"/></td>
                <td></td>
                <td><input type="text" name="beizhu"></td>
                <td><a href="#">删除</a></td>
      </tr>
      <tr>
           <td colspan="3"></td>
           <td><a href="#">添加</a></td>
      </tr>
      <tr>
           <td colspan="4" class="a"><input type="submit" value="保存">
           </td>
      </tr>
     </table>
    </form>
  
  </body>
</html>

DAO:

public class EquipOutDao extends BaseDao{
    public int insertout(EquipOut e){
     String select="insert into outku values(?,?,?,?,?,?)";
     List<Object> params=new ArrayList<Object>();
     params.add(e.getUserno());
        params.add(e.getUsername());
        params.add(e.getPeople());
        params.add(e.getOutdate());
        params.add(e.getEquipno());
        params.add(e.getBeizhu());
     return this.executeUpdate(select, params);
    }
}

实体类:

public class EquipOut {
 private String userno;
 private String username;
 private String people;
 private String outdate;
 private String equipno;
 private String beizhu;
public String getUserno() {
 return userno;
}
public void setUserno(String userno) {
 this.userno = userno;
}
public String getUsername() {
 return username;
}
public void setUsername(String username) {
 this.username = username;
}
public String getPeople() {
 return people;
}
public void setPeople(String people) {
 this.people = people;
}
public String getOutdate() {
 return outdate;
}
public void setOutdate(String outdate) {
 this.outdate = outdate;
}
public String getEquipno() {
 return equipno;
}
public void setEquipno(String equipno) {
 this.equipno = equipno;
}
public String getBeizhu() {
 return beizhu;
}
public void setBeizhu(String beizhu) {
 this.beizhu = beizhu;
}
public EquipOut(String userno, String username, String people, String outdate,
  String equipno, String beizhu) {
 super();
 this.userno = userno;
 this.username = username;
 this.people = people;
 this.outdate = outdate;
 this.equipno = equipno;
 this.beizhu = beizhu;
}
public EquipOut() {
 super();
 // TODO Auto-generated constructor stub
}

SERVICE:

public class EquipOutService {
  EquipOutDao eod=new EquipOutDao();
  public int insertout(EquipOut e){
   return eod.insertout(e);
  }
}

SERVLET:

public class EquipOutServlet extends HttpServlet {

@Override
 protected void doGet(HttpServletRequest req, HttpServletResponse resp)
   throws ServletException, IOException {
  
  doPost(req, resp);
 }

@Override
 protected void doPost(HttpServletRequest req, HttpServletResponse resp)
   throws ServletException, IOException {
  req.setCharacterEncoding("utf-8");
  String userno=req.getParameter("userno");
  String username=req.getParameter("username");
  String people=req.getParameter("people");
  String outdate=req.getParameter("outdate");
  String equipno=req.getParameter("equipno");
  String beizhu=req.getParameter("beizhu");
  EquipOutService eos=new EquipOutService();
  EquipOut eo=new EquipOut(userno, username, people, outdate, equipno, beizhu);
     int a=eos.insertout(eo);
     if(a>0){
      resp.sendRedirect(req.getContextPath()+"/tiaozhuan/Success.jsp");
     }else{
      resp.sendRedirect("http://www.baidu.com");
     }
 }

}

POS管理系统之设备出库的更多相关文章

  1. POS管理系统之新增设备入库

    <%@ page language="java" import="java.util.*" pageEncoding="utf-8"% ...

  2. 练习1:python设计停车入库出库系统

    前言: 最近在某个测试群看到有人抛出了一个面试题.为了提升自己的编程能力,我也尝试的用python去写了一下. 语言:python,数据库:sqlite  .菜鸟来袭,只是基本实现功能,可能没有考虑太 ...

  3. SAP 出库单新版

    *&---------------------------------------------------------------------* *& Report  ZSDR045 ...

  4. ABAP 出库单打印 产品 A搭A A搭B显示方式

    *&---------------------------------------------------------------------* *& Report   *& ...

  5. SQL用先进先出存储过程求出库数量

    create table t( id ,), name ),--商品名称 j int, --入库数量 c int, --出库数量 jdate datetime --入库时间 ) ,,'2007-12- ...

  6. POS管理系统之出入库单分页查询

    JSP: <html>  <head>    <title>My JSP 'inOutKuPage.jsp' starting page</title> ...

  7. SAP打印出库单 新需求

    *&---------------------------------------------------------------------* *& Report  Z_SD_CKD ...

  8. SAP打印出库单需求

    *&---------------------------------------------------------------------* *& Report  Z_SD_CKD ...

  9. soliworks三维机柜布局(一)创建设备型号库

    以某直升机电气系统为例:为电路中的各个设备创建设备型号库是进行三维线束设计的前提之一(如下图所示:窗口中箭头所指的3D部件一定要为每个设备都添加) 设备只有添加了3d模型,在solidworks进行机 ...

随机推荐

  1. AsyncTask的基本使用和各个参数的说明

    AsyncTask 的执行分为四个步骤,每一步都对应一个回调方法,需要注意的是这些方法不应该由应用程序调用,开发者需要做的就是实现这些方法.在任务的执行过程中,这些方法被自动调用. * onPreEx ...

  2. C#获取字符首字母

    ///<summary> /// 获取字符首字母 /// </summary> public static string GetPyChar(string c) { if (s ...

  3. MySQL主机127.0.0.1与localhost区别总结

    1. mysql -h 127.0.0.1 的时候,使用TCP/IP连接, mysql server 认为该连接来自于127.0.0.1或者是"localhost.localdomain&q ...

  4. Android ContentResolve使用

    在Android中使用ContentResolve访问其他程序的数据: http://developer.android.com/reference/android/content/ContentPr ...

  5. 国产AR SDK介绍

    说到VR,大家都知道虚拟现实有多火.可是VR之后呢,还有AR.相较于VR,AR的应用意义更加的强大. 相信在不久的将来AR和VR将会融为一体,把现实世界的数据信息完全联通在我们的眼前.这其中的领头羊莫 ...

  6. HDU 3353

    http://acm.hdu.edu.cn/showproblem.php?pid=3353 题目其实就是要把A B分解质因数,X是它们质因数的并集,D是质因数指数的和(如果有相同的质因数,把它们的指 ...

  7. SVG裁剪和平移的顺序

    SVG 里为元素添加 clip-path 属性即可做出裁剪效果,添加 transfrom 属性可以平移.旋转元素. 根据需求不同,有两种情况: 先裁剪元素,再把裁剪后的图形平移 先平移元素,再按区域裁 ...

  8. 新冲刺Sprint3(第二天)

    一.Sprint介绍 更新商品图片功能已经完成,准备实现浏览商家相关信息功能和更新商品价格.商品描述功能. 二.Sprint周期 看板: 燃尽图:

  9. linux下压缩与解压(zip、unzip、tar)详解

    linux下压缩与解压(zip.unzip.tar)详解 2012-05-09 13:58:39| 分类: linux | 标签:linux zip unzip tar linux命令详解 |举报|字 ...

  10. 排序算法总结(三)选择排序【Select Sort】

    一.原理 选择排序的原理非常简单,就是选出最小(大)的数放在第一位,在剩下的数中,选出最小(大)的数,放在第二位......重复上述步骤,直到最后一个数. 二.过程 原始数据 第一次排序,选出最小的数 ...