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. css布局之一列布局

    在我们浏览网页中经常看见一列布局其实一列布局就是 一般的一列布局的都是固定宽度的 body{margin:0;padding:0} .main{width:800px;height:300px;bac ...

  2. .net 后台读取pdf的值

    在网上找了内容 下载了这个插件 引用在了项目中 然后找到pdf中的位置 进行读取 string pdfPath = Server.MapPath("~/ViewPatPdf.pdf" ...

  3. C++ Primer----智能指针类 2

    指针带给了 C++巨大的灵活性,然而同样也带来无数的问题,悬挂指针,内存泄漏等. int *pInt = new int(1); // Do not forget delete pInt; 智能指针就 ...

  4. UVA 10407 差分思想的运用

    就是每两项相减,肯定能被模数整除. #include <iostream> #include <cstring> #include <cstdio> #includ ...

  5. 苹果IPhone手机由于更新了IOS7 Beta测试版导致“激活出错”后,如何还原电话本和照片方法

    苹果这狗日的,手段果然狠,因为用户提前升级了测试版又没有更新正式版,就突然把手机变砖头,既不让升级正式版,也不让备份手机中的信息,确实有必要这样吗? 我的手机是IPone4s,在看了6月Apple W ...

  6. 跨服务器之间的session共享

    跨服务器之间的Session共享方案需求变得迫切起来,最终催生了多种解决方案,下面列举4种较为可行的方案进行对比探讨: 1. 基于NFS的Session共享 NFS是Net FileSystem的简称 ...

  7. 关于Task类

    private static void tt2() { Task task = null; ; i < ; i++) { task = Task.Factory.StartNew(callbac ...

  8. c++字符串变量---8

    原创博客:转载请标明出处:http://www.cnblogs.com/zxouxuewei/ 一.字符串变量的定义 1>.对于C与C++来说是没有字符串型的数据类型的,在C++中是通过包含st ...

  9. python集成开发工具

    1. IDLE http://python.org/idle/ (在 Python 发行版中自带) 2 BlackAdder 3 PythonWorks 4 Wing IDE http://wingw ...

  10. java初探/java读取文件

    import java.io.*; import java.util.Arrays; public class WriteText { public static void main(String[] ...