Пример #1
0
class RicercaLottiWindow(GladeWidget):

    def __init__(self, parent):
        GladeWidget.__init__(self,
                             root='ricerca_lotti_window',
                             path='ricerca_lotti_window.glade')
        self.__parent = parent
        self.placeWindow(self.getTopLevel())

        self.html_viewer = HTMLViewerWidget(self)
        self.viewer_placeholder.add(self.html_viewer.get_viewer())

        self.draw()

    def draw(self):
        self.anno_entry.set_text(str(datetime.datetime.now().year))

    def on_trova_button_clicked(self, button):
        num_lotto = self.numero_lotto_entry.get_text()
        if not num_lotto:
            return
        anno = int(self.anno_entry.get_text())

        result = ricerca_lotto(num_lotto, anno, progress=self.html_viewer.progressbar)

        pageData = {
            'file': 'ricerca_lotti.html',
            'numero_lotto': num_lotto,
            'data': result
        }

        self.html_viewer.renderHTML(pageData)
class ReportMovimentiSpedizioniWindow(GladeWidget):

    def __init__(self, parent):
        GladeWidget.__init__(self,
                             root='report_mov_sped_window',
                             path='report_mov_sped.glade')
        self.__parent = parent
        self.placeWindow(self.getTopLevel())

        self.html_viewer = HTMLViewerWidget(self)
        self.viewer_placeholder.add(self.html_viewer.get_viewer())

        self.draw()

    def draw(self):
        da_data = datetime.datetime(int(workingYear), 1, 1)
        al_data = datetime.date.today()
        ddt = ricerca_movimenti_spedizione(da_data, al_data, progress=self.html_viewer.progressbar)

        pageData = {
            'data_inizio_report': da_data,
            'data_fine_report': al_data,
            'file': 'spedizione_documenti.html',
            'objects': ddt
        }

        self.html_viewer.renderHTML(pageData)
Пример #3
0
    def __init__(self, parent):
        GladeWidget.__init__(self,
                             root='ricerca_lotti_window',
                             path='ricerca_lotti_window.glade')
        self.__parent = parent
        self.placeWindow(self.getTopLevel())

        self.html_viewer = HTMLViewerWidget(self)
        self.viewer_placeholder.add(self.html_viewer.get_viewer())

        self.draw()
    def __init__(self, parent, daos=None):
        GladeWidget.__init__(self,
                             root='report_mov_sped_window',
                             path='report_mov_sped.glade')
        self.__parent = parent
        self.__daos = daos
        self.placeWindow(self.getTopLevel())

        self.html_viewer = HTMLViewerWidget(self)
        self.viewer_placeholder.add(self.html_viewer.get_viewer())

        self.draw()
class ReportMovimentiSpedizioniWindow(GladeWidget):

    def __init__(self, parent, daos=None):
        GladeWidget.__init__(self,
                             root='report_mov_sped_window',
                             path='report_mov_sped.glade')
        self.__parent = parent
        self.__daos = daos
        self.placeWindow(self.getTopLevel())

        self.html_viewer = HTMLViewerWidget(self)
        self.viewer_placeholder.add(self.html_viewer.get_viewer())

        self.draw()

    def draw(self):
        ddt = ricerca_movimenti_spedizione(self.__daos, progress=self.html_viewer.progressbar)

        pageData = {
            'file': 'spedizione_documenti.html',
            'objects': ddt
        }

        self.html_viewer.renderHTML(pageData)