ITPub博客

首页 > Linux操作系统 > Linux操作系统 > wf_check_emp

wf_check_emp

原创 Linux操作系统 作者:huangjt007 时间:2012-04-10 10:42:42 0 删除 编辑
long ll_emp,ll_1,ll_sum,ll_orno,ll_find,ll_new_row
string ls_emno
string ls_name,ls_find_emno
dw_3.reset()
//select max(t_crep) into :ll_emp from tbl_employee where t_crep not in(1000000,3000000);
//if isnull(ll_emp) or ll_emp=0 then ll_emp=1000
for ll_1=1 to dw_1.rowcount()
 ll_sum=0
 ll_orno=0
 //处理姓名
 ls_name=""
 ls_name=dw_1.getitemstring(ll_1,"t_zrr")
 ls_emno=trim(dw_1.getitemstring(ll_1,"t_emp"))
 do   while   pos(ls_name, ' ')> 0           //空格
  ls_name   =   Replace(ls_name,pos(ls_name, ' '),1, "")
 loop
 ls_name=trim(ls_name)
 dw_1.setitem(ll_1,"t_zrr",ls_name)
 dw_1.accepttext()
 //查找工号是否存在
 ll_find=0
 ls_find_emno=""
 select t_crep into :ls_find_emno from tbl_employee where rtrim(ltrim(t_crep))=:ls_emno;
 if isnull(ls_find_emno) then ls_find_emno=""
   if ls_find_emno="" then
  long ll_find2,ll_2
  string ls_find2
  dw_3.accepttext()
  ll_find2=0
  ls_find2="t_name='"+ls_name+"'"
  ll_find2=dw_3.find(ls_find2,1,dw_3.rowcount())
  if not ll_find2>0 then
   ll_new_row=dw_3.insertrow(0)
   dw_3.setitem(ll_new_row,"t_crep",ls_emno)
   dw_3.setitem(ll_new_row,"t_name",ls_name)
  end if
 else
  dw_1.setitem(ll_1,"t_emp",ls_find_emno)
 end if
// dw_1.setitem(ll_1,"t_emp",ll_emp)
next
if dw_3.rowcount()>0 then
 messagebox("提示","部分营销代表在员工信息表中未定义,请确认其工号!")
 open(w_emp)
 return 0 
end if
return 1

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/75527/viewspace-720775/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: import
下一篇: wf_check_order
请登录后发表评论 登录
全部评论

注册时间:2012-01-31

  • 博文量
    39
  • 访问量
    25650