• 33. 表格对象记录取值方法


    方法1:
    var i=1;
    O_PARAMETER.FObject.each(
      function(v) {
        var empId = v.get("FEmployee");
        LB_Logger("debug", empId);
        LB_sqlExecute("insert into T_ZKX_TestUser (ID,FEmployee) values (?,?)",[i,empId]);
        i++;
      }
    );

    <%@ livebos language='javascript' %>
    var fun = ABS_LOADBEAN("com.plug.FunctionHelper");

    O_PARAMETER.FObject.each(
      function(v) {
        var vid = fun.utilHelper.getNextID("T_HR_TrainFile");
        var empId = v.get("FEmployee");
        var orgid;
        var funit;
        var rs = LB_sqlResultSet("select a.orgid orgid,b.funit funit from tUser a, lborganization b where b.id = a.orgid and a.FEmp = ?",[empId]);
        while(rs.next()) {
          orgid = rs.getString("orgid");
          funit = rs.getString("funit");
        }
        LB_Logger("debug", "------------------------------------------empId="+empId);
        LB_sqlExecute("insert into T_HR_TrainFile (ID,FEmployee,FDept,Funit,FTrainProject) values (?,?)",[vid,empId,orgid,funit,V_1.ID]);
      }
    );

    方法2:

    //表格字段的名称:FObject

    var ho = O_PARAMETER.getColumn("FObject");
    var temp = ho.getRecord();
    temp.beforeFirst();
    var i = 1;
    while(temp.next()) {
      var empId = temp.getInt("FEmployee");
      LB_sqlExecute("insert into T_ZKX_TestUser(ID,FEmployee) values (?,?)",[i,empId]);
      i++;
    }

  • 相关阅读:
    如何激活myecilpse 10
    Myecilpse 10里安装配置maven
    spring mvc 模糊查询防注入
    javascript 取整,取余数
    spring3-mvc实例-信息转换
    CSS中怎么让DIV居中
    git
    浏览器窗口的大小
    如何限制文本框中的字数
    jquery如何设置控件位置
  • 原文地址:https://www.cnblogs.com/zkx4213/p/5486226.html
Copyright © 2020-2023  润新知