zoukankan      html  css  js  c++  java
  • 页面添加数据方法

    /*
    * 添加一条数据方法
    */
    public void AddEtlExtractPositionInfo() {
    int code = Integer.parseInt(get("code").toString());
    this.getmenu(code, this.getRequest());
    Etlextractposition ep = new Etlextractposition();
    // this.copyPropertiesToBean(ep);
    // String id = entity.getId().toString();
    // System.out.println("id---->"+ id);
    // String versionString = entity.getVersionNum().toString();
    // System.out.println("versionString---->"+ versionString);

    // entity.setId()
    // entity.setPositionNum(get("positionNum")!=
    // null?get("positionNum").toString():null);
    // entity.setClasstype(get("classtype")!=
    // null?Integer.parseInt(get("classtype").toString()):null);
    // entity.setVersionNum(get("versionNum")!=
    // null?Integer.parseInt(get("versionNum").toString()):null);
    // entity.setOrderNum(get("orderNum")!=
    // null?Integer.parseInt(get("orderNum").toString()):null);
    // entity.setType(get("type")!=null?Integer.parseInt(get("type").toString()):null);
    // entity.setMeth(get("meth")!=null?Integer.parseInt(get("meth").toString()):null);

    // StringBuffer sBuffer = new StringBuffer("");
    // 获得页面版本和抽取位置和顺序号
    Integer versionNum = Integer.parseInt(get("versionNum").toString());
    String positionNum = get("positionNum").toString();
    String orderNum = get("orderNum").toString();

    // 通过页面版本和抽取位置 做是否重复判断 true
    if (this.etlService.checkVersion2(versionNum, positionNum)) {
    out
    .print("<script>alert('添加失败,位置信息不可重复!');window.history.go(-1);</script>");
    } else {
    // 通过页面版本和抽取位置 做是否重复判断 false
    if (this.etlService.checkorderNum(orderNum, versionNum)) {
    out
    .print("<script>alert('添加失败,顺序号不可重复!');window.history.go(-1);</script>");
    } else {
    ep.setPositionNum(get("positionNum").toString());
    ep.setClasstype(get("classtype") != "" ? Integer.parseInt(get(
    "classtype").toString()) : null);
    ep.setVersionNum(get("versionNum") != "" ? Integer
    .parseInt(get("versionNum").toString()) : null);
    ep.setOrderNum(get("orderNum") != "" ? Integer.parseInt(get(
    "orderNum").toString()) : null);
    ep.setType(get("type") != "" ? Integer.parseInt(get("type")
    .toString()) : null);
    ep.setMeth(get("meth") != "" ? Integer.parseInt(get("meth")
    .toString()) : null);
    if (ep != null || !("".equals(ep))) {
    this.EtlextractpositionDao.insert(ep);
    out
    .print("<script>alert('添加成功!');if(window!=parent){parent.document.getElementById('popCloseBox').click();"
    + "parent.frames['ovfirame'].location='../CheckAction/ListEtlExtractPositionOfAll.action?code="
    + code + "'}; </script>");
    } else {
    out
    .print("<script>alert('添加失败!');window.history.go(-1);</script>");
    }
    }
    }
    }

  • 相关阅读:
    窗口生效函数UpdateData
    查找内容grep命令
    终止函数 atexit()
    根据名字杀死进程Killall
    修改系统时间为UTC时间
    转 proc文件
    NTP算法
    转载,网线的深刻理解
    js完成密码输入为空,和两次输入不一致
    CSS初步了解
  • 原文地址:https://www.cnblogs.com/meimao5211/p/3274756.html
Copyright © 2011-2022 走看看