Example #1
0
def Add_Shift_Screen(self):
    global AddUser
    global AddDate
    global AddCI
    global AddCO

    Today=time.strftime('%d/%m/%Y')
    addself=Gui(debug=False)
    sw = addself.winfo_screenwidth()
    sh = addself.winfo_screenheight()
    x = (sw/2) - (480/2) 
    y = (sh/2) - (310/2)
    addself.geometry('%dx%d+%d+%d' % (480, 310, x, y))
    addself.resizable(width=False, height=False)
    addself.title('Add Shift')
    addself.ErrorLabel=addself.la()
    addself.gr(cols=2)
    addself.la('Username:'******'Calibri',pady=15)
    AddUser = addself.en(font='Calibri', padx=15,pady=15, justify=CENTER, readonlybackground='white')
    addself.la('Date:',font='Calibri',pady=15)
    AddDate = addself.en(font='Calibri',  padx=15,pady=15, text=Today, justify=CENTER, readonlybackground='white')
    addself.la('Check In Time:',font='Calibri',pady=15)
    AddCI = addself.en(font='Calibri',  padx=15, pady=15,text='00:00:00 AM', justify=CENTER, readonlybackground='white')
    addself.la('Check Out Time:',font='Calibri',pady=15)
    AddCO = addself.en(font='Calibri',  padx=15, pady=15,text='00:00:00 AM', justify=CENTER, readonlybackground='white')
    #paidentry.config(state='readonly')
    #changeentry.config(state='readonly')
    addself.endgr()
    addself.row()
    addself.bu('Add Shift', font='Calibri',pady=15, padx=40,  bg='#47c57f',activebackground='lightgreen', fg='black',justify=CENTER, width='5', command=Callable(Add_Shift, self, addself))
    addself.bu('Cancel', font='Calibri',pady=15, padx=40, bg='#d94444',activebackground='#CD5555', fg='black',justify=CENTER, width='5', command=Callable(CancelAdd, self, addself))
    addself.endrow()
    addself.grab_set_global()
    addself.focus_force()
    addself.mainloop()
Example #2
0
def Edit_Shift_Screen(self):
    global EditID
    global EditCI
    global EditCO
    global DateID
    index=self.PayrollManagement.ListBox.curselection()
    if index==():
        ShiftError()
        return
    else:
        ID=index[0]
        #self.grab_set_global()
        editself=Gui(debug=False)
        sw = editself.winfo_screenwidth()
        sh = editself.winfo_screenheight()
        x = (sw/2) - (450/2) 
        y = (sh/2) - (310/2)
        editself.geometry('%dx%d+%d+%d' % (450, 310, x, y))
        editself.resizable(width=False, height=False)
        editself.title('Edit Shift')
        editself.ErrorLabel=editself.la()
        editself.gr(cols=2)
        editself.la('Shift ID:',font='Calibri',pady=15)
        Shift=Modules.PayrollMGMTdisplay.ShiftIDEdit(self, ID)
        Date=Modules.PayrollMGMTdisplay.DateEdit(self, ID)
        CheckIn=Modules.PayrollMGMTdisplay.CheckInEdit(self, ID)
        CheckOut=Modules.PayrollMGMTdisplay.CheckOutEdit(self, ID)
        EditID = editself.en(font='Calibri', padx=15,pady=15, text=Shift, justify=CENTER, readonlybackground='white')
        EditID.config(state='readonly')
        editself.la('Date:',font='Calibri',pady=15)
        DateID = editself.en(font='Calibri', padx=15,pady=15, text=Date, justify=CENTER, readonlybackground='white')
        DateID.config(state='readonly')
        

        editself.la('Check In Time:',font='Calibri',pady=15)
        EditCI = editself.en(font='Calibri',  padx=15,pady=15, text=CheckIn, justify=CENTER, readonlybackground='white')
        editself.la('Check Out Time:',font='Calibri',pady=15)
        EditCO = editself.en(font='Calibri',  padx=15, pady=15,text=CheckOut, justify=CENTER, readonlybackground='white')
        #paidentry.config(state='readonly')
        #changeentry.config(state='readonly')
        editself.endgr()

        editself.row()
        editself.bu('Edit Shift', font='Calibri',pady=15, padx=40,  bg='#47c57f',activebackground='lightgreen', fg='black',justify=CENTER, width='5', command=Callable(Edit_Shift,self, editself))
        editself.bu('Cancel', font='Calibri',pady=15, padx=40, bg='#d94444',activebackground='#CD5555', fg='black',justify=CENTER, width='5', command=Callable(CancelEdit, self, editself))
        editself.endrow()

        
        editself.grab_set_global()
        editself.focus_force()


        editself.mainloop()