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. blocked file type by sharepoint 分类: Sharepoint 2015-07-05 07:45 6人阅读 评论(0) 收藏

    o add or remove blocked file types by using Central Administration Verify that you have the followin ...

  2. php 判断复选框checkbox是否被选中

    php 判断复选框checkbox是否被选中   复选框checkbox在php表单提交中经常被使用到,本文章通过实例向大家介绍php如何判断复选框checkbox中的值是否被选中,需要的朋友可以参考 ...

  3. LPTHW 笨方法学习python 16章

    根据16章的内容作了一些扩展. 比如,判断文件如果存在,就在文件后追加,如不存在则创建. 同时借鉴了shell命令中类似 cat <<EOF > test的方法,提示用户输入一个结尾 ...

  4. 无锁队列以及ABA问题

    队列是我们非常常用的数据结构,用来提供数据的写入和读取功能,而且通常在不同线程之间作为数据通信的桥梁.不过在将无锁队列的算法之前,需要先了解一下CAS(compare and swap)的原理.由于多 ...

  5. 路由器DHCP 动态主机配置

    进入ip设置:ip pool fw 添加网关gateway-list 192.168.1.1 添加网段network 192.168.1.0 mask 255.255.255.0 域名 dns-lis ...

  6. C语言实现的Web服务器(转-kungstriving)

    自己研究了好几天终于写出来一个,哈哈,当然也从网上得到了很多的帮助拉.谢谢大家咯!这个版本还不是很完善,但Web服务器的基本框架已经出来了,还有部分的功能需要进行进一步的测试和修改.虽然说C的开发比较 ...

  7. 黑马程序员——JAVA基础之标准输入输出流

    ------- android培训.java培训.期待与您交流! ---------- 标准输入输出流: System中的基本字段,in,out 它们各代表了系统标准的输入和输出设备. 默认输入设备是 ...

  8. lua的栈

    lua的栈是从栈底到栈顶: lua_pushstring(L, "test1");lua_pushstring(L, "test2");lua_pushstri ...

  9. Google 的开源技术protobuf 简介与例子

    本文来自CSDN博客:http://blog.csdn.NET/program_think/archive/2009/05/31/4229773.aspx 今天来介绍一下"Protocol  ...

  10. mysql 启动 pid报错解决方法

    在安装好mysqld的时候 启动的时候报错如下: [root@ mysql]# service mysqld start Starting MySQL.The server quit without ...