<s> """<STR_LIT>""" <EOL> import wx <EOL> from odmtools . view import clsExisting <EOL> from odmtools . odmdata import series <EOL> import wx . wizard as wiz <EOL> import datetime <EOL> class pageExisting ( wiz . WizardPageSimple ) : <EOL> def __init__ ( self , parent , title , service_man , site ) : <EOL> """<STR_LIT>""" <EOL> wiz . WizardPageSimple . __init__ ( self , parent ) <EOL> sizer = wx . BoxSizer ( wx . VERTICAL ) <EOL> self . sizer = sizer <EOL> self . SetSizer ( sizer ) <EOL> title = wx . StaticText ( self , - <NUM_LIT:1> , title ) <EOL> title . SetFont ( wx . Font ( <NUM_LIT> , wx . SWISS , wx . NORMAL , wx . BOLD ) ) <EOL> sizer . Add ( title , <NUM_LIT:10> , wx . ALIGN_CENTRE | wx . ALL , <NUM_LIT:5> ) <EOL> sizer . Add ( wx . StaticLine ( self , - <NUM_LIT:1> ) , <NUM_LIT:5> , wx . EXPAND | wx . ALL , <NUM_LIT:5> ) <EOL> self . panel = clsExisting . pnlExisting ( self ) <EOL> self . sizer . Add ( self . panel , <NUM_LIT> , wx . ALL , <NUM_LIT:5> ) <EOL> self . _init_data ( service_man . get_series_service ( ) , site . id ) <EOL> def _init_data ( self , series_serv , site_id ) : <EOL> index = <NUM_LIT:0> <EOL> self . initTable ( series_serv , site_id ) <EOL> self . panel . olvSeriesList . Focus ( index ) <EOL> self . panel . olvSeriesList . Select ( index ) <EOL> def OnOLVItemSelected ( self , event ) : <EOL> pass <EOL> def getSeries ( self ) : <EOL> selectedObject = self . panel . olvSeriesList . GetSelectedObject ( ) <EOL> return selectedObject . method , selectedObject . quality_control_level , selectedObject . variable <EOL> def initTable ( self , dbservice , site_id ) : <EOL> """<STR_LIT>""" <EOL> seriesColumns = [ clsExisting . ColumnDefn ( key , align = "<STR_LIT:left>" , <EOL> minimumWidth = - <NUM_LIT:1> , valueGetter = value , <EOL> stringConverter = '<STR_LIT>' if '<STR_LIT:date>' in key . lower ( ) else '<STR_LIT:%s>' ) <EOL> for key , value in series . returnDict ( ) . iteritems ( ) ] <EOL> self . panel . olvSeriesList . SetColumns ( seriesColumns ) <EOL> objects = dbservice . get_series_by_site ( site_id = site_id ) <EOL> self . panel . olvSeriesList . SetObjects ( objects ) </s>
