Интерактивный поиск в Grid-e
[code] SELECT customers IF THISFORM.optiongroup1.Value =1 L1 = UPPER(alltrim(thisform.text1.value)) LN1 = LEN(L1) L2 = UPPER(alltrim(thisform.text2.value)) LN2 = LEN(L2) IF !EMPTY(thisform.text1.value) AND !EMPTY(THISFORM.TEXT2.Value) SET FILTER TO UPPER(LEFT(customers.contactnam,LN1)) == L1 AND ; UPPER(LEFT(customers.companynam,LN2)) == L2 ELSE IF !EMPTY(thisform.text1.value) SET FILTER TO UPPER(LEFT(customers.contactnam,LN1)) == L1 ENDIF IF !EMPTY(THISFORM.TEXT2.Value) SET FILTER TO UPPER(LEFT(customers.companynam,LN2)) == L2 ENDIF ENDIF ELSE IF !EMPTY(thisform.text1.value) AND !EMPTY(THISFORM.TEXT2.Value) SET FILTER TO ATC(alltrim(thisform.text1.value),customers.contactnam) > 0 AND ; ATC(alltrim(thisform.text2.value),customers.companynam) > 0 ELSE IF !EMPTY(thisform.text1.value) SET FILTER TO ATC(alltrim(thisform.text1.value),customers.contactnam) > 0 ENDIF IF !EMPTY(thisform.text2.value) SET FILTER TO ATC(alltrim(thisform.text2.value),customers.companynam) > 0 ENDIF ENDIF GO TOP ENDIF THISFORM.GRID1.Refresh [/code]
Автор: EMustafaoglu
Вложенные файлы
# |
Название |
Тип файла |
Размер |
---|---|---|---|
1 | 505interactivsearch | .zip | 7,10 КБ |