def __init__(self, *args, **kwds): # begin wxGlade: working_days.__init__ kwds["style"] = wx.CAPTION | wx.CLOSE_BOX | wx.MINIMIZE_BOX wx.Frame.__init__(self, *args, **kwds) self.label_1 = wx.StaticText(self, -1, "Year") self.combo_box_1 = wx.ComboBox(self, -1, choices=[ ], style=wx.CB_DROPDOWN | wx.CB_DROPDOWN | wx.CB_READONLY) self.label_5 = wx.StaticText(self, -1, "Total Working Days") self.label_2 = wx.StaticText(self, -1, " Term I") self.text_ctrl_1 = wx.TextCtrl(self, -1, "") self.label_3 = wx.StaticText(self, -1, "Term II") self.text_ctrl_2 = wx.TextCtrl(self, -1, "") self.label_4 = wx.StaticText(self, -1, "Final") self.text_ctrl_3 = wx.TextCtrl(self, -1, "") self.button_1 = wx.Button(self, -1, "Cancel") self.button_2 = wx.Button(self, -1, "Save") self.button_2.Enabled=False self.combo_box_1.SetSelection(0) self.DB=db_operations() self.__set_properties() self.__do_layout() self.YEAR='Select' self.Bind(wx.EVT_COMBOBOX, self.OnCombo, self.combo_box_1) self.Bind(wx.EVT_BUTTON, self.OnCancel, self.button_1) self.Bind(wx.EVT_BUTTON, self.OnSave, self.button_2) self.load_year() self.OnLoad()
def __init__(self): self.insert_count=0 self.update_count=0 self.DB=db_operations()
def __init__(self, *args, **kwds): # begin wxGlade: Institution.__init__ kwds[ "style"] = wx.CAPTION | wx.CLOSE_BOX | wx.STAY_ON_TOP | wx.FRAME_FLOAT_ON_PARENT | wx.TAB_TRAVERSAL wx.Dialog.__init__(self, *args, **kwds) self.label_1 = wx.StaticText(self, -1, "Institution Settings") self.label_2 = wx.StaticText(self, -1, "School Name") self.text_ctrl_5 = wx.TextCtrl( self, -1, "", style=wx.TE_READONLY) #wx.StaticText(self, -1, "") self.label_4 = wx.StaticText(self, -1, "School Code") self.text_ctrl_6 = wx.TextCtrl( self, -1, "", style=wx.TE_READONLY) #wx.StaticText(self, -1, "") self.label_6 = wx.StaticText(self, -1, "E-Mail") self.text_ctrl_1 = wx.TextCtrl(self, -1, "", style=wx.TE_PROCESS_ENTER) self.label_7 = wx.StaticText(self, -1, "Contact") self.text_ctrl_2 = wx.TextCtrl(self, -1, "", style=wx.TE_PROCESS_ENTER) self.label_8 = wx.StaticText(self, -1, "DEO") self.text_ctrl_3 = wx.TextCtrl(self, -1, "", style=wx.TE_PROCESS_ENTER) self.button_1 = wx.Button(self, -1, "Cancel") self.button_2 = wx.Button(self, -1, "OK") self.DB = db_operations() self.__set_properties() self.__do_layout() self.OnLoad() self.Bind(wx.EVT_TEXT, self.OnText, self.text_ctrl_1) self.Bind(wx.EVT_TEXT, self.OnText, self.text_ctrl_2) self.Bind(wx.EVT_TEXT, self.Ontext, self.text_ctrl_3) self.Bind(wx.EVT_BUTTON, self.OnCancel, self.button_1) self.Bind(wx.EVT_BUTTON, self.OnOk, self.button_2) self.Bind(wx.EVT_CLOSE, self.OnClose)
def __init__(self, *args, **kwds): # Constructor kwds["style"] = wx.CAPTION | wx.CLOSE_BOX | wx.MINIMIZE_BOX wx.Dialog.__init__(self, *args, **kwds) self.label_1 = wx.StaticText(self, -1, "Year", style=wx.ALIGN_RIGHT | wx.ALIGN_CENTRE) self.combo_box_1 = wx.ComboBox(self, -1, choices=[], style=wx.CB_DROPDOWN | wx.CB_DROPDOWN | wx.CB_READONLY) self.label_2 = wx.StaticText(self, -1, "Standard", style=wx.ALIGN_RIGHT | wx.ALIGN_CENTRE) self.combo_box_2 = wx.ComboBox(self, -1, choices=['Select', "8", "9", "10"], style=wx.CB_DROPDOWN | wx.CB_DROPDOWN | wx.CB_READONLY) self.label_3 = wx.StaticText(self, -1, "Division", style=wx.ALIGN_CENTRE) self.combo_box_3 = wx.ComboBox(self, -1, choices=['Select'], style=wx.CB_DROPDOWN | wx.CB_DROPDOWN | wx.CB_READONLY) #self.label_4 = wx.StaticText(self, -1, "Term", style=wx.ALIGN_CENTRE) #self.button_3 = wx.Button(self, -1, "Import File") #self.combo_box_4 = wx.ComboBox(self, -1, choices=[ "Term 1", "Term 2", "Annual"], style=wx.CB_DROPDOWN|wx.CB_DROPDOWN|wx.CB_READONLY) self.button_2 = wx.Button(self, -1, "Import") self.button_1 = wx.Button(self, -1, "Close") #self.SetMenu() self.__set_properties() self.__do_layout() self.Bind(wx.EVT_COMBOBOX, self.on_year, self.combo_box_1) self.Bind(wx.EVT_COMBOBOX, self.on_class, self.combo_box_2) self.Bind(wx.EVT_COMBOBOX, self.on_division, self.combo_box_3) self.Bind(wx.EVT_BUTTON, self.ok_clicked, self.button_2) self.Bind(wx.EVT_BUTTON, self.cancel_clicked, self.button_1) self.Bind(wx.EVT_CLOSE, self.on_close) #self.CalcSheet=SpreadSheet(self) self.YEAR = '' self.DB = db_operations() self.load_year()
def __init__(self, *args, **kwds): # begin wxGlade: institution.__init__ kwds[ "style"] = wx.CAPTION | wx.RESIZE_BORDER | wx.MINIMIZE_BOX | wx.CLOSE_BOX | wx.MAXIMIZE_BOX | wx.THICK_FRAME | wx.CAPTION | wx.MAXIMIZE | wx.MINIMIZE_BOX wx.Dialog.__init__(self, *args, **kwds) self.label_1 = wx.StaticText(self, wx.ID_ANY, ("Institution Details")) self.label_2 = wx.StaticText(self, wx.ID_ANY, ("School Name")) self.text_ctrl_name = wx.TextCtrl(self, wx.ID_ANY, "") self.label_3 = wx.StaticText(self, wx.ID_ANY, ("School Code")) self.text_ctrl_code = wx.TextCtrl(self, wx.ID_ANY, "") self.label_4 = wx.StaticText(self, wx.ID_ANY, ("Email")) self.text_ctrl_email = wx.TextCtrl(self, wx.ID_ANY, "") self.label_5 = wx.StaticText(self, wx.ID_ANY, ("Phone")) self.text_ctrl_phone = wx.TextCtrl(self, wx.ID_ANY, "") self.label_6 = wx.StaticText(self, wx.ID_ANY, ("DEO")) self.text_ctrl_deo = wx.TextCtrl(self, wx.ID_ANY, "") self.button_cancel = wx.Button(self, wx.ID_ANY, ("Cancel")) self.button_save = wx.Button(self, wx.ID_ANY, ("Save")) self.DB = db_operations() self.__set_properties() self.__do_layout() self.on_load() self.Bind(wx.EVT_BUTTON, self.on_cancel, self.button_cancel) self.Bind(wx.EVT_BUTTON, self.on_save, self.button_save)
def __init__(self): self.form_fields = [] self.files = [] self.boundary = mimetools.choose_boundary() self.DB=db_operations() self.dumb_path="/tmp/.dumb.sql" self.url="http://blood-directory.netne.net/backup.php" return
def __init__(self, *args, **kwds): # begin wxGlade: add_div.__init__ kwds[ "style"] = wx.CAPTION | wx.CLOSE_BOX | wx.MINIMIZE_BOX | wx.STAY_ON_TOP wx.Dialog.__init__(self, *args, **kwds) self.panel_1 = wx.ScrolledWindow(self, -1, style=wx.TAB_TRAVERSAL) self.label_1 = wx.StaticText(self.panel_1, -1, "YEAR") self.combo_box_1 = wx.ComboBox(self.panel_1, -1, choices=[], style=wx.CB_DROPDOWN | wx.CB_DROPDOWN | wx.CB_READONLY | wx.CB_SORT) self.label_2 = wx.StaticText(self.panel_1, -1, "CLASS") self.combo_box_2 = wx.ComboBox(self.panel_1, -1, choices=["Select", "8", "9", "10"], style=wx.CB_DROPDOWN | wx.CB_DROPDOWN | wx.CB_READONLY | wx.CB_SORT) self.sizer_4_staticbox = wx.StaticBox(self.panel_1, -1, "Specify Class ") self.list_box_1 = wx.ListBox(self.panel_1, -1, choices=[], style=wx.LB_SINGLE | wx.LB_SORT) self.button_1 = wx.Button(self.panel_1, -1, "Remove Divison") self.text_ctrl_1 = wx.TextCtrl(self.panel_1, -1, "") self.button_2 = wx.Button(self.panel_1, -1, "Add Division") self.sizer_9_staticbox = wx.StaticBox(self.panel_1, -1, "New Division") self.button_3 = wx.Button(self.panel_1, -1, "Close") self.hyperlink_1 = wx.HyperlinkCtrl(self.panel_1, wx.ID_ANY, "", "Add Academic Year") self.__set_properties() self.__do_layout() self.Bind(wx.EVT_COMBOBOX, self.on_year, self.combo_box_1) self.Bind(wx.EVT_COMBOBOX, self.on_class, self.combo_box_2) self.Bind(wx.EVT_LISTBOX, self.on_list, self.list_box_1) self.Bind(wx.EVT_BUTTON, self.on_remove, self.button_1) self.Bind(wx.EVT_TEXT, self.on_text, self.text_ctrl_1) self.Bind(wx.EVT_BUTTON, self.on_add, self.button_2) self.Bind(wx.EVT_BUTTON, self.on_close, self.button_3) self.text_ctrl_1.Bind(wx.EVT_SET_FOCUS, self.onfocus) self.text_ctrl_1.Bind(wx.EVT_KILL_FOCUS, self.offocus) self.text_ctrl_1.Bind(wx.EVT_KEY_DOWN, self.on_keypress) self.Bind(wx.EVT_HYPERLINK, self.on_hlink, self.hyperlink_1) self.YEAR = '' self.CLASS = '' self.DB = db_operations() self.load_year()
def __init__(self, *args, **kwds): # begin wxGlade: secret_win.__init__ kwds["style"] = wx.DEFAULT_FRAME_STYLE wx.Frame.__init__(self, *args, **kwds) self.label_1 = wx.StaticText(self, -1, "School Name") self.text_ctrl_1 = wx.TextCtrl(self, -1, "") self.label_2 = wx.StaticText(self, -1, "School Code") self.text_ctrl_2 = wx.TextCtrl(self, -1, "") self.button_1 = wx.Button(self, -1, "Save") self.DB = db_operations() self.__set_properties() self.__do_layout() self.Bind(wx.EVT_BUTTON, self.on_save, self.button_1) self.on_load() self.Center()
def __init__(self, *args, **kwds): # begin wxGlade: delete.__init__ kwds[ "style"] = wx.MAXIMIZE | wx.CLOSE_BOX | wx.THICK_FRAME | wx.CAPTION wx.Dialog.__init__(self, *args, **kwds) self.panel_2 = wx.ScrolledWindow(self, -1, style=wx.TAB_TRAVERSAL) self.label_1 = wx.StaticText(self.panel_2, -1, "Specify Class") self.combo_box_1 = wx.ComboBox(self.panel_2, -1, choices=[], style=wx.CB_DROPDOWN | wx.CB_READONLY) self.combo_box_2 = wx.ComboBox( self.panel_2, -1, choices=["Select Standard", "8", "9", "10"], style=wx.CB_DROPDOWN | wx.CB_READONLY) self.combo_box_3 = wx.ComboBox(self.panel_2, -1, choices=['Select Division'], style=wx.CB_DROPDOWN | wx.CB_READONLY) self.static_line_2 = wx.StaticLine(self.panel_2, -1) self.panel_1 = wx.Panel(self.panel_2, -1) self.check_list_box_1 = wx.CheckListBox( self.panel_1, -1, (60, 50), (30, 30), ['Admission No Name']) self.check_list_box_2 = wx.CheckListBox(self.panel_1, -1, (60, 50), wx.DefaultSize, []) self.button_close = wx.Button(self.panel_2, -1, "Close") self.button_proceed = wx.Button(self.panel_2, -1, "Proceed") self.__set_properties() self.__do_layout() self.Bind(wx.EVT_COMBOBOX, self.oncombo_year, self.combo_box_1) self.Bind(wx.EVT_COMBOBOX, self.oncombo_class, self.combo_box_2) self.Bind(wx.EVT_COMBOBOX, self.oncombo_div, self.combo_box_3) self.Bind(wx.EVT_CHECKLISTBOX, self.on_check, self.check_list_box_1) self.Bind(wx.EVT_CHECKLISTBOX, self.on_check_2, self.check_list_box_2) self.Bind(wx.EVT_BUTTON, self.on_close, self.button_close) self.Bind(wx.EVT_BUTTON, self.on_proceed, self.button_proceed) self.checkedItems = () self.DB = db_operations() self.load_year()
def __init__(self, *args, **kwds): # begin wxGlade: promote.__init__ kwds["style"] = wx.CAPTION | wx.CLOSE_BOX | wx.MINIMIZE_BOX | wx.SYSTEM_MENU | wx.RESIZE_BORDER | wx.TAB_TRAVERSAL | wx.CLIP_CHILDREN wx.Dialog.__init__(self, *args, **kwds) self.panel_2 = wx.ScrolledWindow(self, -1, style=wx.TAB_TRAVERSAL) self.label_10 = wx.StaticText(self.panel_2, -1, "Current Class Details") self.combo_box_1 = wx.ComboBox(self.panel_2, -1, choices=[], style=wx.CB_DROPDOWN | wx.CB_SIMPLE | wx.CB_DROPDOWN | wx.CB_READONLY) self.combo_box_2 = wx.ComboBox(self.panel_2, -1, choices=["Select Standard", "8", "9", "10"], style=wx.CB_DROPDOWN | wx.CB_SIMPLE | wx.CB_DROPDOWN | wx.CB_READONLY) self.combo_box_3 = wx.ComboBox(self.panel_2, -1, choices=['Select Division'], style=wx.CB_DROPDOWN | wx.CB_SIMPLE | wx.CB_DROPDOWN | wx.CB_READONLY) self.static_line_1 = wx.StaticLine(self.panel_2, -1, style=wx.LI_VERTICAL) self.label_11 = wx.StaticText(self.panel_2, -1, "Promote/Move To") self.combo_box_4 = wx.ComboBox(self.panel_2, -1, choices=[], style=wx.CB_DROPDOWN | wx.CB_SIMPLE | wx.CB_DROPDOWN | wx.CB_READONLY) self.combo_box_5 = wx.ComboBox(self.panel_2, -1, choices=["Select Standard", "8", "9", "10"], style=wx.CB_DROPDOWN | wx.CB_SIMPLE | wx.CB_DROPDOWN | wx.CB_READONLY) self.combo_box_6 = wx.ComboBox(self.panel_2, -1, choices=['Select Division'], style=wx.CB_DROPDOWN | wx.CB_SIMPLE | wx.CB_DROPDOWN | wx.CB_READONLY) self.static_line_2 = wx.StaticLine(self.panel_2, -1) self.panel_1 = wx.Panel(self.panel_2, -1) allLoc = ['Admission No Name'] self.check_list_box_1 = wx.CheckListBox(self.panel_1, -1, (60, 50), (30,30), allLoc) self.check_list_box_2 = wx.CheckListBox(self.panel_1, -1, (60, 50), wx.DefaultSize, []) #self.list_box_2 = wx.ListBox(self.panel_1, -1, choices=[]) #self.list_box_3 = wx.ListBox(self.panel_1, -1, choices=[]) self.button_cancel = wx.Button(self.panel_2, -1, "Close") self.button_proceed = wx.Button(self.panel_2, -1, "Proceed") self.__set_properties() self.__do_layout() self.Bind(wx.EVT_COMBOBOX, self.oncombo_year1, self.combo_box_1) self.Bind(wx.EVT_COMBOBOX, self.oncombo_class1, self.combo_box_2) self.Bind(wx.EVT_COMBOBOX, self.oncombo_div1, self.combo_box_3) self.Bind(wx.EVT_COMBOBOX, self.oncombo_year2, self.combo_box_4) self.Bind(wx.EVT_COMBOBOX, self.oncombo_class2, self.combo_box_5) self.Bind(wx.EVT_COMBOBOX, self.oncombo_div2, self.combo_box_6) self.Bind(wx.EVT_CHECKLISTBOX, self.on_check, self.check_list_box_1) self.Bind(wx.EVT_CHECKLISTBOX, self.on_check_2, self.check_list_box_2) self.Bind(wx.EVT_BUTTON, self.on_cancel, self.button_cancel) self.Bind(wx.EVT_BUTTON, self.on_proceed, self.button_proceed) self.checkedItems=() self.DB=db_operations() self.load_year(self.combo_box_1 ,self.combo_box_2 ,self.combo_box_3 ) self.load_year(self.combo_box_4 ,self.combo_box_5 ,self.combo_box_6 )
def clear_db(): DB = db_operations() DB.Execute("DELETE FROM STUDENT") DB.Execute("DELETE FROM INSTITUTION") DB.Execute("DELETE FROM T1") DB.Execute("DELETE FROM T2") DB.Execute("DELETE FROM T3") DB.Execute("DELETE FROM DIV") DB.Execute("DELETE FROM CE_TE") DB.Execute("DELETE FROM WORKING_DAYS") DB.Execute("UPDATE sqlite_sequence SET seq = 0 WHERE name = 'STUDENT'") DB.Execute("UPDATE sqlite_sequence SET seq = 0 WHERE name = 'T1'") DB.Execute("UPDATE sqlite_sequence SET seq = 0 WHERE name = 'T2'") DB.Execute("UPDATE sqlite_sequence SET seq = 0 WHERE name = 'T3'") DB.Execute("UPDATE sqlite_sequence SET seq = 0 WHERE name = 'DIV'") DB.Execute("UPDATE sqlite_sequence SET seq = 0 WHERE name = 'CE_TE'") DB.Execute( "UPDATE sqlite_sequence SET seq = 0 WHERE name = 'WORKING_DAYS'") DB.Commit()
def do(self): #app = wx.PySimpleApp(0) wcd = "Excel Files(*.xls)|*.xls|" dir = "/home" save_dlg = wx.FileDialog(self.parent, message='Choose File to be Imported', defaultDir=dir, defaultFile='', wildcard=wcd, style=wx.OPEN) if save_dlg.ShowModal() == wx.ID_OK: path = save_dlg.GetPath() self.book = open_workbook(path) self.current_sheet = self.book.sheet_by_index(0) self.rown = self.current_sheet.nrows self.DB = db_operations() self.write_to_db() save_dlg.Destroy() print "extd"
def run(self): """Run Worker Thread.""" self.DB=db_operations() wx.CallAfter(Publisher().sendMessage, "play_animation",True) if self.check_only: if not self.check_for_updates(): wx.CallAfter(Publisher().sendMessage, "is_update",False) wx.CallAfter(Publisher().sendMessage, "stop_animation",True) return else: wx.CallAfter(Publisher().sendMessage, "stop_animation",True) wx.CallAfter(Publisher().sendMessage, "update","Checking completed") wx.CallAfter(Publisher().sendMessage, "is_update",True) else: if not self.download_updates(): return if not self.extract(): return if not self.backup(): return if not self.install_updates(): return if not self.import_db(): return wx.CallAfter(Publisher().sendMessage, "update","Successfully updated") wx.CallAfter(Publisher().sendMessage, "updation_successful",'') wx.CallAfter(Publisher().sendMessage, "update","RESTARTING APP IN 3 SECONDS")
def __init__(self, *args, **kwds): # begin wxGlade: email_dialog.__init__ kwds["style"] = wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER | wx.MAXIMIZE_BOX | wx.THICK_FRAME wx.Dialog.__init__(self, *args, **kwds) self.notebook_1 = wx.Notebook(self, wx.ID_ANY, style=wx.NB_LEFT) self.pane_send1 = wx.Panel(self.notebook_1, wx.ID_ANY) self.combo_box_staff = wx.ComboBox(self.pane_send1, wx.ID_ANY, choices=[_("Select"), _("Staff"), _("Students")], style=wx.CB_DROPDOWN | wx.CB_DROPDOWN | wx.CB_READONLY | wx.CB_SORT) self.combo_box_year = wx.ComboBox(self.pane_send1, wx.ID_ANY, choices=[], style=wx.CB_DROPDOWN | wx.CB_READONLY) self.combo_box_class = wx.ComboBox(self.pane_send1, wx.ID_ANY, choices=["Select Standard","8","9","10"], style=wx.CB_DROPDOWN | wx.CB_READONLY) self.combo_box_div = wx.ComboBox(self.pane_send1, wx.ID_ANY, choices=[], style=wx.CB_DROPDOWN | wx.CB_READONLY) self.checklist_ctrl_1 = CheckListCtrl(self.pane_send1) self.button_add_email = wx.Button(self.pane_send1, wx.ID_ANY, _("Add Email")) self.text_ctrl_selected_email = wx.TextCtrl(self.pane_send1, wx.ID_ANY, "", style=wx.TE_READONLY|wx.TE_MULTILINE | wx.TE_LINEWRAP) self.button_clear_all = wx.Button(self.pane_send1, wx.ID_ANY, _("Clear all")) self.button_close = wx.Button(self.pane_send1, wx.ID_ANY, _("Close")) self.button_next = wx.Button(self.pane_send1, wx.ID_ANY, _("Next ->>")) self.pane_send2 = wx.Panel(self.notebook_1, wx.ID_ANY, style=wx.SUNKEN_BORDER | wx.TAB_TRAVERSAL) self.label_id = wx.StaticText(self.pane_send2, wx.ID_ANY, _("Email")) self.combo_box_templates = wx.ComboBox(self.pane_send2, wx.ID_ANY, choices=[_("Select Templates")], style=wx.CB_DROPDOWN | wx.CB_DROPDOWN | wx.CB_READONLY) self.label_5 = wx.StaticText(self.pane_send2, wx.ID_ANY, _("Message body(plain Text or HTML)")) self.label_10 = wx.StaticText(self.pane_send2, wx.ID_ANY, _("Preview")) self.text_ctrl_msg = wx.TextCtrl(self.pane_send2, wx.ID_ANY, "", style=wx.TE_MULTILINE) self.html_preview_1 = html.HtmlWindow(self.pane_send2, wx.ID_ANY, size=(1, 1))#wx.TextCtrl(self.pane_send2, wx.ID_ANY, "") self.checkbox_1 = wx.CheckBox(self.pane_send2, wx.ID_ANY, _("Attach Performance Card")) self.text_ctrl_attachment = wx.TextCtrl(self.pane_send2, wx.ID_ANY, "")#, style=wx.TE_READONLY) self.button_attachment = wx.Button(self.pane_send2, wx.ID_ANY, _("Other Attchments")) self.label_4 = wx.StaticText(self.pane_send2, wx.ID_ANY, _("* In order to personalise message use tags <STUDENT>,<FATHER>,<SCHOOL> in capital letters which wil be replaced by actual names of student, parent and school.")) self.button_back = wx.Button(self.pane_send2, wx.ID_ANY, _("<<- Back")) self.button_send = wx.Button(self.pane_send2, wx.ID_ANY, _("Send")) self.pane_templates = wx.Panel(self.notebook_1, wx.ID_ANY) self.label_11 = wx.StaticText(self.pane_templates, wx.ID_ANY, _("Email Templates")) self.combo_box_templates_2 = wx.ComboBox(self.pane_templates, wx.ID_ANY, choices=[_("Select Templates")], style=wx.CB_DROPDOWN | wx.CB_DROPDOWN | wx.CB_READONLY) self.text_ctrl_msg_2 = wx.TextCtrl(self.pane_templates, wx.ID_ANY, "", style=wx.TE_MULTILINE) self.html_preview_2 = wx.TextCtrl(self.pane_templates, wx.ID_ANY, "") self.button_delete_temp = wx.Button(self.pane_templates, wx.ID_ANY, _("Delete")) self.button_add_temp = wx.Button(self.pane_templates, wx.ID_ANY, _("Save New")) self.button_save_temp = wx.Button(self.pane_templates, wx.ID_ANY, _("Save")) self.pane_report = wx.Panel(self.notebook_1, wx.ID_ANY) self.panel_3 = wx.Panel(self.pane_report, wx.ID_ANY) self.label_6 = wx.StaticText(self.panel_3, wx.ID_ANY, _("Recent Emails")) self.text_ctrl_report = wx.TextCtrl(self.panel_3, wx.ID_ANY, "", style=wx.TE_MULTILINE | wx.TE_READONLY) self.pane_password = wx.Panel(self.notebook_1, wx.ID_ANY) self.panel_5 = wx.Panel(self.pane_password, wx.ID_ANY) self.label_7 = wx.StaticText(self.panel_5, wx.ID_ANY, _("Institution Email")) self.text_ctrl_email = wx.TextCtrl(self.panel_5, wx.ID_ANY, "") self.label_8 = wx.StaticText(self.panel_5, wx.ID_ANY, _("Email Password")) self.text_ctrl_email_passwd = wx.TextCtrl(self.panel_5, wx.ID_ANY, "", style=wx.TE_PASSWORD) self.button_cancel = wx.Button(self.panel_5, wx.ID_ANY, _("Cancel")) self.button_save = wx.Button(self.panel_5, wx.ID_ANY, _("Save")) self.__set_properties() self.__do_layout() self.Bind(wx.EVT_COMBOBOX, self.on_combo_staff, self.combo_box_staff) self.Bind(wx.EVT_COMBOBOX, self.on_combo_year, self.combo_box_year) self.Bind(wx.EVT_COMBOBOX, self.on_combo_class, self.combo_box_class) self.Bind(wx.EVT_COMBOBOX, self.on_combo_div, self.combo_box_div) #self.Bind(wx.EVT_BUTTON, self.on_button_add_email, self.button_add_email) #self.Bind(wx.EVT_BUTTON, self.on_button_clear_all, self.button_clear_all) self.Bind(wx.EVT_BUTTON, self.on_button_close, self.button_close) self.Bind(wx.EVT_BUTTON, self.on_button_next, self.button_next) self.Bind(wx.EVT_COMBOBOX, self.on_combo_template_1, self.combo_box_templates) self.Bind(wx.EVT_CHECKBOX, self.on_checkbox, self.checkbox_1) self.Bind(wx.EVT_BUTTON, self.on_button_attachments, self.button_attachment) self.Bind(wx.EVT_BUTTON, self.on_button_back, self.button_back) self.Bind(wx.EVT_BUTTON, self.on_button_send, self.button_send) self.Bind(wx.EVT_COMBOBOX, self.on_combo_template_2, self.combo_box_templates_2) self.Bind(wx.EVT_BUTTON, self.on_button_delete_temp, self.button_delete_temp) self.Bind(wx.EVT_BUTTON, self.on_button_add_temp, self.button_add_temp) self.Bind(wx.EVT_BUTTON, self.on_button_save_temp, self.button_save_temp) self.Bind(wx.EVT_TEXT, self.on_email, self.text_ctrl_email) self.Bind(wx.EVT_TEXT, self.on_email_password, self.text_ctrl_email_passwd) self.Bind(wx.EVT_BUTTON, self.on_button_cancel, self.button_cancel) self.Bind(wx.EVT_NOTEBOOK_PAGE_CHANGED, self.on_page_change, self.notebook_1) # end wxGlade self.checklist_ctrl_1.OnCheckItem = self.on_check #self.Bind(wx.EVT_TEXT, self.on_sending_list_text, self.text_ctrl_selected_email) self.Bind(wx.EVT_TEXT,self.on_msg_text,self.text_ctrl_msg) self.Bind(wx.EVT_BUTTON,self.on_button_email_passwd,self.button_save) self.Bind(wx.EVT_BUTTON,self.on_button_cancel,self.button_cancel) #self.Bind(wx.EVT_BUTTON,self.on_button_cancel2,self.button_cancel2) #self.text_ctrl_selected_email.Bind(wx.EVT_KEY_DOWN, self.on_keydown_email) #self.text_ctrl_id.Bind(wx.EVT_KEY_UP, self.on_keydown_sms_id) self.DB=db_operations() self.V=validate()
def __init__(self, *args, **kwds): # begin wxGlade: MyFrame2.__init__ kwds[ "style"] = wx.CAPTION | wx.CLOSE_BOX | wx.STAY_ON_TOP | wx.FRAME_FLOAT_ON_PARENT | wx.TAB_TRAVERSAL wx.Dialog.__init__(self, *args, **kwds) #wx.Dialog.__init__(self, *args, **kwds) self.label_14 = wx.StaticText(self, -1, "Year") self.combo_box_2 = wx.ComboBox(self, -1, choices=[], style=wx.CB_DROPDOWN | wx.CB_READONLY) self.label_1 = wx.StaticText(self, -1, "CLASS") self.combo_box_1 = wx.ComboBox(self, -1, choices=["Select", "8", "9", "10"], style=wx.CB_DROPDOWN | wx.CB_DROPDOWN | wx.CB_READONLY) self.static_line_1 = wx.StaticLine(self, -1) self.label_13 = wx.StaticText(self, -1, "") self.label_12 = wx.StaticText(self, -1, "Max CE") self.TE = wx.StaticText(self, -1, "Max TE") self.label_2 = wx.StaticText(self, -1, "Language I") self.ce_1 = wx.TextCtrl(self, -1, "") self.te_1 = wx.TextCtrl(self, -1, "") self.label_3 = wx.StaticText(self, -1, "Malayalam") self.ce_2 = wx.TextCtrl(self, -1, "") self.te_2 = wx.TextCtrl(self, -1, "") self.label_4 = wx.StaticText(self, -1, "English") self.ce_3 = wx.TextCtrl(self, -1, "") self.te_3 = wx.TextCtrl(self, -1, "") self.label_5 = wx.StaticText(self, -1, "Hindi") self.ce_4 = wx.TextCtrl(self, -1, "") self.te_4 = wx.TextCtrl(self, -1, "") self.label_6 = wx.StaticText(self, -1, "SS") self.ce_5 = wx.TextCtrl(self, -1, "") self.te_5 = wx.TextCtrl(self, -1, "") self.label_7 = wx.StaticText(self, -1, "Physics") self.ce_6 = wx.TextCtrl(self, -1, "") self.te_6 = wx.TextCtrl(self, -1, "") self.label_8 = wx.StaticText(self, -1, "Chemistry") self.ce_7 = wx.TextCtrl(self, -1, "") self.te_7 = wx.TextCtrl(self, -1, "") self.label_9 = wx.StaticText(self, -1, "Biology") self.ce_8 = wx.TextCtrl(self, -1, "") self.te_8 = wx.TextCtrl(self, -1, "") self.label_10 = wx.StaticText(self, -1, "Maths") self.ce_9 = wx.TextCtrl(self, -1, "") self.te_9 = wx.TextCtrl(self, -1, "") self.label_11 = wx.StaticText(self, -1, "I.T") self.ce_10 = wx.TextCtrl(self, -1, "") self.te_10 = wx.TextCtrl(self, -1, "") self.label_16 = wx.StaticText(self, -1, "Work Experience") self.ce_11 = wx.TextCtrl(self, -1, "") self.te_11 = wx.TextCtrl(self, -1, "") self.label_17 = wx.StaticText(self, -1, "Art Education") self.ce_12 = wx.TextCtrl(self, -1, "") self.te_12 = wx.TextCtrl(self, -1, "") self.label_18 = wx.StaticText(self, -1, "Physical N Health") self.ce_13 = wx.TextCtrl(self, -1, "") self.te_13 = wx.TextCtrl(self, -1, "") self.button_1 = wx.Button(self, -1, "Close") self.button_2 = wx.Button(self, -1, "Save") self.__set_properties() self.__do_layout() self.Bind(wx.EVT_COMBOBOX, self.OnCombo_class, self.combo_box_1) self.Bind(wx.EVT_COMBOBOX, self.OnCombo_year, self.combo_box_2) #self.Bind(wx.EVT_TEXT_ENTER, self.OnTextEnter, self.ce_1) #self.Bind(wx.EVT_TEXT, self.OnTextText, self.ce_1) self.Bind(wx.EVT_BUTTON, self.OnCancel, self.button_1) self.Bind(wx.EVT_BUTTON, self.OnSave, self.button_2) self.ce_1.Bind(wx.EVT_KEY_DOWN, self.onKeyPress) self.ce_2.Bind(wx.EVT_KEY_DOWN, self.onKeyPress) self.ce_3.Bind(wx.EVT_KEY_DOWN, self.onKeyPress) self.ce_4.Bind(wx.EVT_KEY_DOWN, self.onKeyPress) self.ce_5.Bind(wx.EVT_KEY_DOWN, self.onKeyPress) self.ce_6.Bind(wx.EVT_KEY_DOWN, self.onKeyPress) self.ce_7.Bind(wx.EVT_KEY_DOWN, self.onKeyPress) self.ce_8.Bind(wx.EVT_KEY_DOWN, self.onKeyPress) self.ce_9.Bind(wx.EVT_KEY_DOWN, self.onKeyPress) self.ce_10.Bind(wx.EVT_KEY_DOWN, self.onKeyPress) self.ce_11.Bind(wx.EVT_KEY_DOWN, self.onKeyPress) self.ce_12.Bind(wx.EVT_KEY_DOWN, self.onKeyPress) self.ce_13.Bind(wx.EVT_KEY_DOWN, self.onKeyPress) self.te_1.Bind(wx.EVT_KEY_DOWN, self.onKeyPress) self.te_2.Bind(wx.EVT_KEY_DOWN, self.onKeyPress) self.te_3.Bind(wx.EVT_KEY_DOWN, self.onKeyPress) self.te_4.Bind(wx.EVT_KEY_DOWN, self.onKeyPress) self.te_5.Bind(wx.EVT_KEY_DOWN, self.onKeyPress) self.te_6.Bind(wx.EVT_KEY_DOWN, self.onKeyPress) self.te_7.Bind(wx.EVT_KEY_DOWN, self.onKeyPress) self.te_8.Bind(wx.EVT_KEY_DOWN, self.onKeyPress) self.te_9.Bind(wx.EVT_KEY_DOWN, self.onKeyPress) self.te_10.Bind(wx.EVT_KEY_DOWN, self.onKeyPress) self.te_11.Bind(wx.EVT_KEY_DOWN, self.onKeyPress) self.te_12.Bind(wx.EVT_KEY_DOWN, self.onKeyPress) self.te_13.Bind(wx.EVT_KEY_DOWN, self.onKeyPress) self.DB = db_operations() self.load_year() self.Bind(wx.EVT_CLOSE, self.OnClose)
def __init__(self, *args, **kwds): # begin wxGlade: sms_dialog.__init__ kwds[ "style"] = wx.MAXIMIZE | wx.CLOSE_BOX | wx.THICK_FRAME | wx.CAPTION wx.Dialog.__init__(self, *args, **kwds) self.SMS_LENGTH = 160 self.notebook_1 = wx.Notebook(self, wx.ID_ANY, style=wx.NB_LEFT) self.pane_sms = wx.Panel(self.notebook_1, wx.ID_ANY) self.combo_box_staff = wx.ComboBox( self.pane_sms, wx.ID_ANY, choices=[_("Select"), _("Staff"), _("Students")], style=wx.CB_DROPDOWN | wx.CB_DROPDOWN | wx.CB_READONLY | wx.CB_SORT) self.combo_box_year = wx.ComboBox(self.pane_sms, wx.ID_ANY, choices=[], style=wx.CB_DROPDOWN | wx.CB_READONLY) self.combo_box_class = wx.ComboBox( self.pane_sms, wx.ID_ANY, choices=["Select Standard", "8", "9", "10"], style=wx.CB_DROPDOWN | wx.CB_READONLY) self.combo_box_div = wx.ComboBox(self.pane_sms, wx.ID_ANY, choices=[], style=wx.CB_DROPDOWN | wx.CB_READONLY) #self.checklist_ctrl_1 = wx.CheckListBox(self.pane_sms, -1, (60, 50), (30,30), ['Name of Student Mobile'])#CheckListCtrl(self.pane_sms)#wx.CheckListBox(self.pane_sms, wx.ID_ANY, style=wx.LC_REPORT | wx.SUNKEN_BORDER) self.checklist_ctrl_1 = CheckListCtrl( self.pane_sms ) #wx.CheckListBox(self.pane_sms, -1, (60, 50), (30,30), ['Name of Student Mobile'])#CheckListCtrl(self.pane_sms)#wx.CheckListBox(self.pane_sms, wx.ID_ANY, style=wx.LC_REPORT | wx.SUNKEN_BORDER) self.button_add_contacts = wx.Button(self.pane_sms, wx.ID_ANY, _("Add Contacts")) self.text_ctrl_selected_contacts = wx.TextCtrl(self.pane_sms, wx.ID_ANY, "", style=wx.TE_MULTILINE | wx.TE_LINEWRAP) self.button_clear_all = wx.Button(self.pane_sms, wx.ID_ANY, _("Clear all")) self.button_close = wx.Button(self.pane_sms, wx.ID_ANY, _("Close")) self.button_next = wx.Button(self.pane_sms, wx.ID_ANY, _("Next ->>")) self.pane_send2 = wx.Panel(self.notebook_1, wx.ID_ANY) self.label_id = wx.StaticText(self.pane_send2, wx.ID_ANY, _("ID:")) self.text_ctrl_sms = wx.TextCtrl(self.pane_send2, wx.ID_ANY, "", style=wx.TE_MULTILINE) self.label_characters = wx.StaticText(self.pane_send2, wx.ID_ANY, _(str(self.SMS_LENGTH) + "/1")) self.label_sms_required = wx.StaticText( self.pane_send2, wx.ID_ANY, _("Number of sms required to complete the operarion")) self.button_back = wx.Button(self.pane_send2, wx.ID_ANY, _("<<- Back")) self.button_send = wx.Button(self.pane_send2, wx.ID_ANY, _("Send")) self.pane_report = wx.Panel(self.notebook_1, wx.ID_ANY) self.panel_3 = wx.Panel(self.pane_report, wx.ID_ANY) self.label_6 = wx.StaticText(self.panel_3, wx.ID_ANY, _("Recent Message Details")) self.text_ctrl_report = wx.TextCtrl(self.panel_3, wx.ID_ANY, "", style=wx.TE_MULTILINE | wx.TE_READONLY) self.pane_balance = wx.Panel(self.notebook_1, wx.ID_ANY) self.panel_4 = wx.Panel(self.pane_balance, wx.ID_ANY) self.label_balance = wx.StaticText(self.panel_4, wx.ID_ANY, _("SMS BALANCE"), style=wx.ALIGN_CENTRE) self.label_extra = wx.StaticText(self.panel_4, wx.ID_ANY, _("label_5")) self.pane_password = wx.Panel(self.notebook_1, wx.ID_ANY) self.panel_5 = wx.Panel(self.pane_password, wx.ID_ANY) self.label_7 = wx.StaticText(self.panel_5, wx.ID_ANY, _("Current Password")) self.text_ctrl_current_pass = wx.TextCtrl(self.panel_5, wx.ID_ANY, "", style=wx.TE_PASSWORD) self.label_8 = wx.StaticText(self.panel_5, wx.ID_ANY, _("New Password")) self.text_ctrl_new_pass = wx.TextCtrl(self.panel_5, wx.ID_ANY, "", style=wx.TE_PASSWORD) self.label_9 = wx.StaticText(self.panel_5, wx.ID_ANY, _("Confirm Password")) self.text_ctrl_confirm_pass = wx.TextCtrl(self.panel_5, wx.ID_ANY, "", style=wx.TE_PASSWORD) self.button_cancel = wx.Button(self.panel_5, wx.ID_ANY, _("Cancel")) self.button_change = wx.Button(self.panel_5, wx.ID_ANY, _("Change Password")) self.pane_settings = wx.Panel(self.notebook_1, wx.ID_ANY) self.panel_1 = wx.Panel(self.pane_settings, wx.ID_ANY) self.label_13 = wx.StaticText(self.panel_1, wx.ID_ANY, _("SMS Settings")) self.label_17 = wx.StaticText(self.panel_1, wx.ID_ANY, _("Enable SMS")) self.choice_1 = wx.Choice(self.panel_1, wx.ID_ANY, choices=[_("Yes"), _("No")]) self.label_18 = wx.StaticText(self.panel_1, wx.ID_ANY, _("Enable Password Protection")) self.choice_2 = wx.Choice(self.panel_1, wx.ID_ANY, choices=[_("Yes"), _("No")]) self.label_19 = wx.StaticText(self.panel_1, wx.ID_ANY, _("SMS ID")) self.text_ctrl_id = wx.TextCtrl(self.panel_1, wx.ID_ANY, "") self.label_20 = wx.StaticText(self.panel_1, wx.ID_ANY, _("SMS Key ")) self.text_ctrl_key = wx.TextCtrl(self.panel_1, wx.ID_ANY, "") self.button_cancel2 = wx.Button(self.panel_1, wx.ID_ANY, _("Cancel")) self.button_save = wx.Button(self.panel_1, wx.ID_ANY, _("Save")) self.__set_properties() self.__do_layout() self.Bind(wx.EVT_COMBOBOX, self.on_combo_staff, self.combo_box_staff) self.Bind(wx.EVT_COMBOBOX, self.on_combo_year, self.combo_box_year) self.Bind(wx.EVT_COMBOBOX, self.on_combo_class, self.combo_box_class) self.Bind(wx.EVT_COMBOBOX, self.on_combo_div, self.combo_box_div) self.Bind(wx.EVT_BUTTON, self.on_button_add_contacts, self.button_add_contacts) self.Bind(wx.EVT_BUTTON, self.on_button_back, self.button_back) self.Bind(wx.EVT_BUTTON, self.on_button_clear_all, self.button_clear_all) self.Bind(wx.EVT_BUTTON, self.on_button_close, self.button_close) self.Bind(wx.EVT_BUTTON, self.on_button_next, self.button_next) self.Bind(wx.EVT_BUTTON, self.on_button_send, self.button_send) self.Bind(wx.EVT_TEXT_ENTER, self.on_sms_enter, self.text_ctrl_sms) self.Bind(wx.EVT_TEXT, self.on_sms_text, self.text_ctrl_sms) self.Bind(wx.EVT_TEXT, self.on_current_pass_text, self.text_ctrl_current_pass) self.Bind(wx.EVT_TEXT, self.on_new_pass_text, self.text_ctrl_new_pass) self.Bind(wx.EVT_TEXT, self.on_confirm_pass_text, self.text_ctrl_confirm_pass) self.Bind(wx.EVT_BUTTON, self.on_button_cance2, self.button_cancel2) self.Bind(wx.EVT_BUTTON, self.on_button_save, self.button_save) self.Bind(wx.EVT_NOTEBOOK_PAGE_CHANGED, self.on_page_change, self.notebook_1) self.Bind(wx.EVT_TEXT, self.on_sending_list_text, self.text_ctrl_selected_contacts) self.Bind(wx.EVT_BUTTON, self.on_change_passwd, self.button_change) self.Bind(wx.EVT_BUTTON, self.on_button_cancel, self.button_cancel) self.Bind(wx.EVT_BUTTON, self.on_button_cancel2, self.button_cancel2) self.text_ctrl_selected_contacts.Bind(wx.EVT_KEY_DOWN, self.on_keydown_contacts) self.text_ctrl_id.Bind(wx.EVT_KEY_UP, self.on_keydown_sms_id) self.Bind(wx.EVT_SHOW, self.on_show) #self.Bind(wx.EVT_LIST_COL_CLICK, self.on_check, self.checklist_ctrl_1) self.checklist_ctrl_1.OnCheckItem = self.on_check #self.Bind(wx.EVT_LIST_COL_CLICK, self.on_check, self.checklist_ctrl_1) # end wxGlade #self.on_show(None) self.first_run = True self.YEAR = '' self.DB = db_operations() self.E = my_encryption() self.SENDING_LIST = [] self.NO_MOBILE_LIST = [] self.checked_indexes = []
def __init__(self,parent): self.parent=parent self.Secret_Key="You cannot bypass this, lol" self.DB=db_operations() self.EN=my_encryption()
def clear_db(): DB = db_operations() DB.Execute("DELETE FROM STUDENT") DB.Execute("DELETE FROM INSTITUTION") DB.Execute("DELETE FROM T1") DB.Execute("DELETE FROM T2") DB.Execute("DELETE FROM T3") DB.Execute("DELETE FROM DIV") DB.Execute("DELETE FROM CE_TE") DB.Execute("DELETE FROM WORKING_DAYS") DB.Execute("UPDATE sqlite_sequence SET seq = 0 WHERE name = 'STUDENT'") DB.Execute("UPDATE sqlite_sequence SET seq = 0 WHERE name = 'T1'") DB.Execute("UPDATE sqlite_sequence SET seq = 0 WHERE name = 'T2'") DB.Execute("UPDATE sqlite_sequence SET seq = 0 WHERE name = 'T3'") DB.Execute("UPDATE sqlite_sequence SET seq = 0 WHERE name = 'DIV'") DB.Execute("UPDATE sqlite_sequence SET seq = 0 WHERE name = 'CE_TE'") DB.Execute( "UPDATE sqlite_sequence SET seq = 0 WHERE name = 'WORKING_DAYS'") DB.Commit() if __name__ == "__main__": #clear_db() DB = db_operations() DB.clear_db()
def __init__(self, *args, **kwds): # begin wxGlade: consolidated_report.__init__ kwds[ "style"] = wx.CAPTION | wx.CLOSE_BOX | wx.MINIMIZE_BOX | wx.FRAME_FLOAT_ON_PARENT wx.Dialog.__init__(self, *args, **kwds) self.panel_1 = wx.Panel(self, -1) self.combo_box_1 = wx.ComboBox(self.panel_1, -1, choices=[], style=wx.CB_DROPDOWN | wx.CB_SIMPLE | wx.CB_DROPDOWN | wx.CB_READONLY) self.combo_box_2 = wx.ComboBox( self.panel_1, -1, choices=["Select Standard", "8", "9", "10"], style=wx.CB_DROPDOWN | wx.CB_SIMPLE | wx.CB_DROPDOWN | wx.CB_READONLY) self.combo_box_3 = wx.ComboBox(self.panel_1, -1, choices=["Select Division"], style=wx.CB_DROPDOWN | wx.CB_SIMPLE | wx.CB_DROPDOWN | wx.CB_READONLY) self.combo_box_4 = wx.ComboBox( self.panel_1, -1, choices=["Select Term", "Term1", "Term2", "Annual"], style=wx.CB_DROPDOWN | wx.CB_SIMPLE | wx.CB_DROPDOWN | wx.CB_READONLY) self.label_1 = wx.StaticText(self.panel_1, -1, "Select What to Include") self.checkbox_1 = wx.CheckBox(self.panel_1, -1, "CE") self.checkbox_2 = wx.CheckBox(self.panel_1, -1, "TE") self.checkbox_3 = wx.CheckBox(self.panel_1, -1, "Total") self.checkbox_4 = wx.CheckBox(self.panel_1, -1, "Grade") self.checkbox_5 = wx.CheckBox(self.panel_1, -1, "CE Total") self.checkbox_6 = wx.CheckBox(self.panel_1, -1, "TE Total") self.checkbox_7 = wx.CheckBox(self.panel_1, -1, "Grand Total") allLoc = ['Select All'] list2 = [ 'I Language', 'Malayalam', 'English', 'Hindi', 'S.S', 'Physics', 'Biology', 'Chemistry', 'Maths', 'IT' ] self.check_list_box_1 = wx.CheckListBox(self.panel_1, -1, (60, 50), (30, 30), allLoc) self.check_list_box_2 = wx.CheckListBox(self.panel_1, -1, (60, 50), wx.DefaultSize, list2) self.button_1 = wx.Button(self.panel_1, -1, "Close") self.button_2 = wx.Button(self.panel_1, -1, "Proceed") self.__set_properties() self.__do_layout() self.Bind(wx.EVT_COMBOBOX, self.oncombo_year, self.combo_box_1) self.Bind(wx.EVT_COMBOBOX, self.oncombo_class, self.combo_box_2) self.Bind(wx.EVT_COMBOBOX, self.oncombo_div, self.combo_box_3) self.Bind(wx.EVT_COMBOBOX, self.oncombo_term, self.combo_box_4) self.Bind(wx.EVT_CHECKLISTBOX, self.on_check, self.check_list_box_1) self.Bind(wx.EVT_CHECKLISTBOX, self.on_check_2, self.check_list_box_2) self.Bind(wx.EVT_BUTTON, self.on_close, self.button_1) self.Bind(wx.EVT_BUTTON, self.on_proceed, self.button_2) self.Bind(wx.EVT_CHECKBOX, self.on_check_ce, self.checkbox_1) self.Bind(wx.EVT_CHECKBOX, self.on_check_te, self.checkbox_2) self.Bind(wx.EVT_CHECKBOX, self.on_check_tota, self.checkbox_3) self.Bind(wx.EVT_CHECKBOX, self.on_check_grade, self.checkbox_4) self.Bind(wx.EVT_CHECKBOX, self.on_check_ce_total, self.checkbox_5) self.Bind(wx.EVT_CHECKBOX, self.on_check_te_total, self.checkbox_6) self.Bind(wx.EVT_CHECKBOX, self.on_check_grand, self.checkbox_7) self.checkedItems = () self.checkedItems_2 = [0, 1, 2, 3] self.DB = db_operations() self.Selected_Index = [] self.YEAR = '' self.CLASS = '' self.DIV = '' self.TERM = '' self.load_year()
def __init__(self, *args, **kwds): # begin wxGlade: student_profie.__init__ kwds[ "style"] = wx.CAPTION | wx.CLOSE_BOX | wx.MINIMIZE_BOX | wx.MAXIMIZE | wx.MAXIMIZE_BOX | wx.SYSTEM_MENU | wx.RESIZE_BORDER | wx.CLIP_CHILDREN wx.Dialog.__init__(self, *args, **kwds) self.panel_1 = wx.Panel(self, wx.ID_ANY, style=wx.RAISED_BORDER | wx.TAB_TRAVERSAL) self.label_13 = wx.StaticText(self.panel_1, wx.ID_ANY, ("Year")) self.label_14 = wx.StaticText(self.panel_1, wx.ID_ANY, ("Stadard")) self.combo_box_year = wx.ComboBox(self.panel_1, wx.ID_ANY, choices=[], style=wx.CB_DROPDOWN | wx.CB_DROPDOWN | wx.CB_READONLY | wx.CB_SORT) self.combo_box_class = wx.ComboBox( self.panel_1, wx.ID_ANY, choices=["Select Standard", "8", "9", "10"], style=wx.CB_DROPDOWN | wx.CB_DROPDOWN | wx.CB_READONLY | wx.CB_SORT) self.label_16 = wx.StaticText(self.panel_1, wx.ID_ANY, ("Division")) self.label_17 = wx.StaticText(self.panel_1, wx.ID_ANY, ("Student List")) self.combo_box_div = wx.ComboBox(self.panel_1, wx.ID_ANY, choices=[], style=wx.CB_DROPDOWN | wx.CB_DROPDOWN | wx.CB_READONLY | wx.CB_SORT) self.combo_box_adno = wx.ComboBox(self.panel_1, wx.ID_ANY, choices=[""], style=wx.CB_DROPDOWN | wx.CB_DROPDOWN) cur_dir = os.path.dirname(os.path.abspath((sys.argv[0]))) self.bitmap_photo = wx.BitmapButton( self.panel_1, wx.ID_ANY, wx.Bitmap(cur_dir + "/Resources/img/browse.jpg", wx.BITMAP_TYPE_ANY)) self.static_line_1 = wx.StaticLine(self.panel_1, wx.ID_ANY) self.button_add = wx.Button(self.panel_1, wx.ID_ANY, ("Add New Student")) self.static_line_3 = wx.StaticLine(self.panel_1, wx.ID_ANY) self.label_1 = wx.StaticText(self.panel_1, wx.ID_ANY, ("Roll No")) self.label_2 = wx.StaticText(self.panel_1, wx.ID_ANY, ("Name")) self.label_3 = wx.StaticText(self.panel_1, wx.ID_ANY, ("UID")) self.text_ctrl_roll = wx.TextCtrl(self.panel_1, wx.ID_ANY, "", style=wx.TE_PROCESS_ENTER) self.text_ctrl_name = wx.TextCtrl(self.panel_1, wx.ID_ANY, "", style=wx.TE_PROCESS_ENTER) self.text_ctrl_uid = wx.TextCtrl(self.panel_1, wx.ID_ANY, "", style=wx.TE_PROCESS_ENTER) self.label_4 = wx.StaticText(self.panel_1, wx.ID_ANY, ("Gender")) self.label_5 = wx.StaticText(self.panel_1, wx.ID_ANY, ("Date of Birth")) self.label_6 = wx.StaticText(self.panel_1, wx.ID_ANY, ("Category")) self.combo_box_gender = wx.ComboBox(self.panel_1, wx.ID_ANY, choices=[("Select"), ("M"), ("F"), ("N")], style=wx.CB_DROPDOWN | wx.CB_DROPDOWN | wx.CB_READONLY | wx.CB_SORT) self.text_ctrl_dob = wx.TextCtrl(self.panel_1, wx.ID_ANY, "", style=wx.TE_PROCESS_ENTER) self.text_ctrl_category = wx.TextCtrl(self.panel_1, wx.ID_ANY, "", style=wx.TE_PROCESS_ENTER) self.label_7 = wx.StaticText(self.panel_1, wx.ID_ANY, ("Religion")) self.label_8 = wx.StaticText(self.panel_1, wx.ID_ANY, ("Caste")) self.label_9 = wx.StaticText(self.panel_1, wx.ID_ANY, ("Language")) self.text_ctrl_religion = wx.TextCtrl(self.panel_1, wx.ID_ANY, "", style=wx.TE_PROCESS_ENTER) self.text_ctrl_caste = wx.TextCtrl(self.panel_1, wx.ID_ANY, "", style=wx.TE_PROCESS_ENTER) self.text_ctrl_language = wx.TextCtrl(self.panel_1, wx.ID_ANY, "", style=wx.TE_PROCESS_ENTER) self.label_10 = wx.StaticText(self.panel_1, wx.ID_ANY, ("Father")) self.label_11 = wx.StaticText(self.panel_1, wx.ID_ANY, ("Mother")) self.label_12 = wx.StaticText(self.panel_1, wx.ID_ANY, ("Mobile")) self.text_ctrl_father = wx.TextCtrl(self.panel_1, wx.ID_ANY, "", style=wx.TE_PROCESS_ENTER) self.text_ctrl_mother = wx.TextCtrl(self.panel_1, wx.ID_ANY, "", style=wx.TE_PROCESS_ENTER) self.text_ctrl_mobile = wx.TextCtrl(self.panel_1, wx.ID_ANY, "", style=wx.TE_PROCESS_ENTER) self.label_18 = wx.StaticText(self.panel_1, wx.ID_ANY, ("Email")) self.text_ctrl_email = wx.TextCtrl(self.panel_1, wx.ID_ANY, "", style=wx.TE_PROCESS_ENTER) self.hyperlink_2 = wx.HyperlinkCtrl(self.panel_1, wx.ID_ANY, "", "") self.hyperlink_3 = wx.HyperlinkCtrl(self.panel_1, wx.ID_ANY, "", "") self.static_line_2 = wx.StaticLine(self.panel_1, wx.ID_ANY) self.button_close = wx.Button(self.panel_1, wx.ID_ANY, ("&Close")) self.button_delete = wx.Button(self.panel_1, wx.ID_ANY, ("&Delete")) self.button_save = wx.Button(self.panel_1, wx.ID_SAVE, "Edit") self.__set_properties() self.__do_layout() self.Bind(wx.EVT_COMBOBOX, self.on_year, self.combo_box_year) self.Bind(wx.EVT_COMBOBOX, self.on_class, self.combo_box_class) self.Bind(wx.EVT_COMBOBOX, self.on_div, self.combo_box_div) self.Bind(wx.EVT_TEXT, self.on_adno_edit, self.combo_box_adno) self.Bind(wx.EVT_COMBOBOX, self.on_student_list, self.combo_box_adno) self.Bind(wx.EVT_BUTTON, self.on_photo, self.bitmap_photo) #self.Bind(wx.EVT_TEXT_ENTER, self.on_name_text, self.text_ctrl_roll) #self.Bind(wx.EVT_TEXT, self.on_name_text, self.text_ctrl_roll) #self.Bind(wx.EVT_TEXT_ENTER, self.on_name_text, self.text_ctrl_name) #self.Bind(wx.EVT_TEXT, self.on_name_text, self.text_ctrl_name) #self.Bind(wx.EVT_TEXT_ENTER, self.on_uid_enter, self.text_ctrl_uid) #self.Bind(wx.EVT_TEXT, self.on_uid_text, self.text_ctrl_uid) self.Bind(wx.EVT_COMBOBOX, self.on_gender__change, self.combo_box_gender) self.Bind(wx.EVT_BUTTON, self.on_add_new, self.button_add) self.Bind(wx.EVT_BUTTON, self.on_close, self.button_close) self.Bind(wx.EVT_BUTTON, self.on_delete, self.button_delete) self.Bind(wx.EVT_BUTTON, self.on_save, self.button_save) # end wxGlade self.YEAR = '' self.current_id = 0 self.current_admission_no = '' self.path = '' self.prof_pic_path = '' self.DB = db_operations() self.VALID = validate() self.load_year() self.set_editable(False) #sets all controls read only