예제 #1
0
        def wrapper():
            if not data_holder.are_sheets_loaded():
                MessageDialog(self, "Load contractors and procurements first!")
                return

            self.set_output(sort_date_time1())
            self.set_output(sort_by_expired_date1(True))
예제 #2
0
        def wrapper():
            if not data_holder.are_sheets_loaded():
                MessageDialog(self, "Load contractors and procurements first!")
                return

            self.output_tb.set_output(
                function_12.sort_by_nonexpired_date1(asc))
예제 #3
0
        def wrapper():
            if not data_holder.are_sheets_loaded():
                MessageDialog(self, "Load contractors and procurements first!")
                return

            self.output_tb.set_output(function_9.agency_min_procurement())
            self.output_tb.set_output(function_9.sorted_min_procurement(asc))
예제 #4
0
 def function_2_clicked(self, e):
     function_2.createFolder()
     function_2.writetxt()
     function_2.txtdetails()
     if not data_holder.are_sheets_loaded():
         MessageDialog(self, "Load contractors and procurements first!")
         return
예제 #5
0
 def function_5_clicked(self, e):
     """
     Check if sheets are loaded and perform function 5
     """
     if not data_holder.are_sheets_loaded():
         MessageDialog(self, "Load contractors and procurements first!")
         return
     self.output_tb.set_output(function_5())
예제 #6
0
 def wrapper():
     if not data_holder.are_sheets_loaded():
         MessageDialog(self, "Load contractors and procurements first!")
         return
     function_3.procurement_dictionary1()
     function_3.total_procurement_dictionary1()
     self.output_tb.set_output(
         function_3.sorted_total_procurement_dictionary1(asc))
예제 #7
0
 def function_2_clicked(self, e):
     """
     Check if sheets are loaded and perform function 2
     """
     if not data_holder.are_sheets_loaded():
         MessageDialog(self, "Load contractors and procurements first!")
         return
     function_2.save()
예제 #8
0
    def function_10_clicked(self, e):
        """
        Check if sheets are loaded and show the workheads pop up window
        """
        if not data_holder.are_sheets_loaded():
            MessageDialog(self, "Load contractors and procurements first!")
            return

        WorkheadsPage(self)
예제 #9
0
        def wrapper():
            if not data_holder.are_sheets_loaded():
                MessageDialog(self, "Load contractors and procurements first!")
                return

            self.set_output(procurement_dictionary1())
            self.set_output(total_procurement_dictionary1())
            self.set_output(agency_min_procurement())
            self.set_output(sorted_min_procurement(asc))
예제 #10
0
    def lda_function_clicked(self, e):
        """
        Check if sheets are loaded and show procurements grouped by topic.
        The topics are created using natural language processing, LDA model
        """

        if not data_holder.are_sheets_loaded():
            MessageDialog(self, "Load contractors and procurements first!")
            return
        ProcurementTopicsDialog(self)
예제 #11
0
        def inner_func(e):
            path = self.prompt_sheet_location()
            if path == '':
                return

            try:
                func(path)
            except:
                traceback.print_exc()
                MessageDialog(self, "Please select the correct sheet")
예제 #12
0
    def procurements_browse_clicked(self, e):
        path = self.prompt_sheet_location()
        if path == '':
            return

        try:
            data_holder.load_procurement_list(path)
        except:
            traceback.print_exc()
            MessageDialog(self, "Please select the correct sheet")
예제 #13
0
 def on_send_message(self, widget):
     widget.set_sensitive(False)
     messageDialog = MessageDialog()
     response = messageDialog.run()
     if response == Gtk.ResponseType.ACCEPT:
         text = messageDialog.get_text()
         if text != '':
             self.gotify_client.send_message(text)
     messageDialog.destroy()
     widget.set_sensitive(True)
예제 #14
0
 def wrapper():
     if not data_holder.are_sheets_loaded():
         MessageDialog(self, "Load contractors and procurements first!")
         return
     self.output_tb.set_output(function_6(category))
예제 #15
0
        def wrapper():
            if not data_holder.are_sheets_loaded():
                MessageDialog(self, "Load contractors and procurements first!")
                return

            self.set_output(contractor_workhead_grade())
예제 #16
0
    def function_6_clicked(self, e):
        if not data_holder.are_sheets_loaded():
            MessageDialog(self, "Load contractors and procurements first!")
            return

        self.set_output(function_5())