Программирование в среде FoxPro. Создание базы данных “Бакалея”, страница 7

*       *                                                        

*       * Procedure Origin:                                      

*       *                                                        

*       * From Menu:  MENU.MPR,            Record:    7          

*       * Called By:  ON SELECTION BAR 3 OF POPUP базаданных     

*       * Prompt:     выход                                      

*       * Snippet:    2                                          

*       *                                                         

*       *********************************************************

*

PROCEDURE _0uo16xeck

Set Sysmenu To Default

*       *********************************************************

*       *                                                         

*       * _0UO16XECL  ON SELECTION BAR 7 OF POPUP поиск          

*       *                                                        

*       * Procedure Origin:                                      

*       *                                                        

*       * From Menu:  MENU.MPR,            Record:   22          

*       * Called By:  ON SELECTION BAR 7 OF POPUP поиск          

*       * Prompt:     прибора по популярности                    

*       * Snippet:    3                                          

*       *                                                         

*       *********************************************************

*

PROCEDURE _0uo16xecl

Close Table All

Use pribori!pribori

popul=0

Do While !EOF()

If pribori.количество >popul

popul=pribori.количество

Endif

Skip

Enddo

Scan For pribori.количество=popul

Browse Record Recno()

Endscan

*       *********************************************************

*       *                                                        

*       * _0UO16XECP  ON SELECTION BAR 1 OF POPUP цены           

*       *                                                        

*       * Procedure Origin:                                      

*       *                                                        

*       * From Menu:  MENU.MPR,            Record:   13          

*       * Called By:  ON SELECTION BAR 1 OF POPUP цены           

*       * Prompt:     самый дорогой прибор                       

*       * Snippet:    4                                          

*       *                                                         

*       *********************************************************

*

PROCEDURE _0uo16xecp

Close Table All

Use pribori!pribori

cost=0

Do While !EOF()

If pribori.цена >cost

cost=pribori.цена

Endif

Skip

Enddo

Scan For pribori.цена=cost

Browse Record Recno()

Endscan

*       *********************************************************

*       *                                                        

*       * _0UO16XECQ  ON SELECTION BAR 2 OF POPUP цены           

*       *                                                        

*       * Procedure Origin:                                      

*       *                                                        

*       * From Menu:  MENU.MPR,            Record:   14           

*       * Called By:  ON SELECTION BAR 2 OF POPUP цены           

*       * Prompt:     самый дешевый прибор                       

*       * Snippet:    5                                          

*       *                                                        

*       *********************************************************

*

PROCEDURE _0uo16xecq

Close Table All

Use pribori!pribori

cost=9999999999

Do While !EOF()

If pribori.цена < cost

cost=pribori.цена

Endif

Skip

Enddo

Scan For pribori.цена=cost

Browse Record Recno()

Endscan


7.  Примеры работы.

пример 1.

пример 2.

пример 3.

пример 4.

8.  Список литературы:

  1. лекции по СУБД.
  2. Т.В. Мусина, В.А. Пущенко “Самоучитель Visual FoxPro 6.0”,  СПБ 1999