long ll_emp,ll_1,ll_sum,ll_orno,ll_find
string ls_find,ls_type
for ll_1=1 to dw_1.rowcount()
ll_sum=0
ll_orno=0
// dw_1.setitem(ll_1,"t_cjr",gs_userID)
// ll_sum=dw_1.getitemnumber(ll_1,"t_xl")
// if not ll_sum>0 then
// Messagebox("错误!","第"+string(ll_1)+"行的发货数量不大于0,无法导入!")
// dw_1.setrow(ll_1)
// dw_1.selectrow(ll_1,true)
// dw_1.scrolltorow(ll_1)
// return 0
// end if
ll_orno =long(dw_1.getitemstring(ll_1,"t_ddh"))
if isnull(ll_orno) or ll_orno<=0 then
Messagebox("错误!","第"+string(ll_1)+"行的订单号异常,请确认是否正确!")
dw_1.setrow(ll_1)
dw_1.selectrow(ll_1,true)
dw_1.scrolltorow(ll_1)
return 0
end if
//检查该订单是否已经在此次录入
ls_find="t_orno="+string(ll_orno)
ll_find=dw_2.find(ls_find,1,dw_2.rowcount())
if ll_find>0 then
Messagebox("提示"+string(ll_find),"你已经添加了该订单!")
dw_2.scrolltorow(ll_find)
dw_2.selectrow(ll_find,true)
dw_1.setrow(ll_1)
dw_1.selectrow(ll_1,true)
dw_1.scrolltorow(ll_1)
return(0)
end if
ll_find=0
select count(*) into :ll_find from tbl_sls where t_orno=:ll_orno;
if ll_find>0 then
Messagebox("提示","该订单已经存在!")
dw_1.setrow(ll_1)
dw_1.selectrow(ll_1,true)
dw_1.scrolltorow(ll_1)
return(0)
end if
ls_type=dw_1.getitemstring(ll_1,"t_cpm")
if ls_type="搅拌站" then
messagebox("提示","请将产品名称'搅拌站'改为'混凝土搅拌站'")
return 0
end if
next
return 1
string ls_find,ls_type
for ll_1=1 to dw_1.rowcount()
ll_sum=0
ll_orno=0
// dw_1.setitem(ll_1,"t_cjr",gs_userID)
// ll_sum=dw_1.getitemnumber(ll_1,"t_xl")
// if not ll_sum>0 then
// Messagebox("错误!","第"+string(ll_1)+"行的发货数量不大于0,无法导入!")
// dw_1.setrow(ll_1)
// dw_1.selectrow(ll_1,true)
// dw_1.scrolltorow(ll_1)
// return 0
// end if
ll_orno =long(dw_1.getitemstring(ll_1,"t_ddh"))
if isnull(ll_orno) or ll_orno<=0 then
Messagebox("错误!","第"+string(ll_1)+"行的订单号异常,请确认是否正确!")
dw_1.setrow(ll_1)
dw_1.selectrow(ll_1,true)
dw_1.scrolltorow(ll_1)
return 0
end if
//检查该订单是否已经在此次录入
ls_find="t_orno="+string(ll_orno)
ll_find=dw_2.find(ls_find,1,dw_2.rowcount())
if ll_find>0 then
Messagebox("提示"+string(ll_find),"你已经添加了该订单!")
dw_2.scrolltorow(ll_find)
dw_2.selectrow(ll_find,true)
dw_1.setrow(ll_1)
dw_1.selectrow(ll_1,true)
dw_1.scrolltorow(ll_1)
return(0)
end if
ll_find=0
select count(*) into :ll_find from tbl_sls where t_orno=:ll_orno;
if ll_find>0 then
Messagebox("提示","该订单已经存在!")
dw_1.setrow(ll_1)
dw_1.selectrow(ll_1,true)
dw_1.scrolltorow(ll_1)
return(0)
end if
ls_type=dw_1.getitemstring(ll_1,"t_cpm")
if ls_type="搅拌站" then
messagebox("提示","请将产品名称'搅拌站'改为'混凝土搅拌站'")
return 0
end if
next
return 1
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/75527/viewspace-720776/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/75527/viewspace-720776/