IF dwo.name="vc_fieldname" THEN
string ls_table_name,ls_column_name,ls_column_type,ls_edit_style,ls_dddw_name,ls_temp
string ls_display_value,ls_data_value
long ll_row,ll_position,ll_insertrow
this.object.vc_tablename[row]=ls_table_name
this.object.vc_fieldtype[row]=ls_column_type
if rb_1.checked=true then
CHOOSE CASE upper(ls_column_type)
CASE "VARCHAR","CHAR"
this.object.vc_operator[row]="like"
CASE "BIGINT","DECIMAL","FLOAT","INT","MONEY","NUMERIC","REAL","SMALLINT","SMALLMONEY","TINYINT"
this.object.vc_operator[row]="="
CASE "DATETIME","SMALLDATETIME"
this.object.vc_operator[row]="="
CASE ELSE
messagebox("提示","不能识别的检索数据类型:"+ls_column_type)
END CHOOSE
end if
this.object.vc_fieldvalue[row] = ''
ls_edit_style = ids_search.describe(ls_column_name + '.edit.style')
ls_edit_style = lower(ls_edit_style)
choose case ls_edit_style
case 'dddw'
ls_dddw_name = ids_search.describe(ls_column_name + '.dddw.name')
if not isnull(ls_dddw_name) and ls_dddw_name <> '' then
this.object.vc_fieldvalue.dddw.name = ls_dddw_name
ls_temp = ids_search.describe(ls_column_name + '.dddw.displaycolumn')
this.object.vc_fieldvalue.dddw.displaycolumn = ls_temp
ls_temp = ids_search.describe(ls_column_name + '.dddw.datacolumn')
this.object.vc_fieldvalue.dddw.datacolumn = ls_temp
this.object.vc_fieldvalue.dddw.allowedit = true
this.object.vc_fieldvalue.dddw.vscrollbar = 'yes'
end if
case 'ddlb'
ids_display_value.reset()
ls_temp = ids_search.GetValue(ls_column_name,1)
ll_row = 1
DO WHILE not isnull(ls_temp) and (ls_temp <> '')
ll_position = pos(ls_temp,'~t')
if ll_position = 0 then
ls_display_value = ls_temp
ls_data_value = ls_temp
else
ls_display_value = left(ls_temp,ll_position - 1)
ls_data_value = mid(ls_temp,ll_position + 1)
end if
ll_insertrow = ids_display_value.insertrow(0)
ids_display_value.setitem(ll_insertrow,'code',ls_data_value)
ids_display_value.setitem(ll_insertrow,'value',ls_display_value)
ll_row ++
ls_temp = ids_search.GetValue (ls_column_name,ll_row)
LOOP
this.object.vc_fieldvalue.dddw.name = 'dddw_display_value'
this.object.vc_fieldvalue.dddw.displaycolumn = 'value'
this.object.vc_fieldvalue.dddw.datacolumn = 'code'
this.getchild('vc_fieldvalue',idw_child_value)
ids_display_value.sharedata(idw_child_value)
this.object.vc_fieldvalue.dddw.vscrollbar = 'yes'
this.object.vc_fieldvalue.dddw.allowedit = true
this.object.vc_fieldvalue.dddw.vscrollbar = 'yes'
case 'checkbox'
ids_display_value.reset()
ls_temp = ids_search.getvalue(ls_column_name,1)
ll_position = pos(ls_temp,'~t')
ls_data_value = mid(ls_temp,ll_position + 1)
ls_temp = wf_get_item(ls_column_type,ls_column_name,idw_child_value)
ll_insertrow = ids_display_value.insertrow(0)
ids_display_value.setitem(ll_insertrow,'code',ls_data_value)
ids_display_value.setitem(ll_insertrow,'value',ls_temp)
this.object.vc_fieldvalue.dddw.name = 'dddw_display_value'
this.object.vc_fieldvalue.dddw.displaycolumn = 'value'
this.object.vc_fieldvalue.dddw.datacolumn = 'code'
this.getchild('vc_fieldvalue',idw_child_value)
ids_display_value.sharedata(idw_child_value)
this.object.vc_fieldvalue.dddw.vscrollbar = 'yes'
this.object.vc_fieldvalue.dddw.allowedit = true
this.object.vc_fieldvalue.dddw.vscrollbar = 'yes'
case 'radiobuttons'
ids_display_value.reset()
ls_temp = ids_search.GetValue(ls_column_name,1)
ll_row = 1
DO WHILE not isnull(ls_temp) and (ls_temp <> '')
ll_position = pos(ls_temp,'~t')
if ll_position = 0 then
ls_display_value = ls_temp
ls_data_value = ls_temp
else
ls_display_value = left(ls_temp,ll_position - 1)
ls_data_value = mid(ls_temp,ll_position + 1)
end if
ids_display_value.insertrow(0)
ids_display_value.setitem(ll_row,'code',ls_data_value)
ids_display_value.setitem(ll_row,'value',ls_display_value)
ll_row ++
ls_temp = ids_search.GetValue (ls_column_name,ll_row)
LOOP
this.object.vc_fieldvalue.dddw.name = 'dddw_display_value'
this.object.vc_fieldvalue.dddw.displaycolumn = 'value'
this.object.vc_fieldvalue.dddw.datacolumn = 'code'
this.getchild('vc_fieldvalue',idw_child_value)
ids_display_value.sharedata(idw_child_value)
this.object.vc_fieldvalue.dddw.vscrollbar = 'yes'
this.object.vc_fieldvalue.dddw.allowedit = true
this.object.vc_fieldvalue.dddw.vscrollbar = 'yes'
end choose