Ejemplo n.º 1
0
    def __init__(self, emp_id):
        self.instance_emp_mange = emp_manage_functions()
        self.cloud_manger_instance = cloud_manger()
        self.emp_id_instance = emp_id
        self.t = time.strftime('%d/%m/%Y, %H:%M:%S', time.localtime())
        self.main_win = tkinter.Tk()
        self.main_win.geometry("335x100")
        self.main_win.title("SELECT FILE")
        self.main_win.sourceFile = ''

        self.b_chooseFile = tkinter.Button(self.main_win,
                                           text="Choose File",
                                           command=self.chooseFile,
                                           font=('Helvetica', 11, 'bold'))
        self.upload = tkinter.Button(self.main_win,
                                     text="UPLOAD",
                                     width=38,
                                     command=self.up)
        self.b_chooseFile.place(x=0, y=0)
        self.b_chooseFile.width = 100
        self.upload.place(x=0, y=30)
        self.response = tkinter.Label(
            self.main_win, text="Select the file and wait for response ")
        self.response.place(x=45, y=60)
        self.field = tkinter.Entry(self.main_win)
        self.field.place(width=200)
        self.field.place(x=130, y=3)
Ejemplo n.º 2
0
    def __init__(self):
        self.text = ""
        staus = True
        self.c = cloud_manger()
        self.p = project_handel_func()
        if self.c.database_sync_get():
            self.text = "Your network is slow"
            staus = False
        else:
            self.text = "* Denotes mandatory\n Collect you Password and \nEmp_id from Admin\n\nWelcome to Colleague"

        call_id = 0
        self.root = Tk()
        # OK FUNCTION DEFINITION WHICH IS USED IN LAYOUT
        self.root.title("SIGN IN")
        self.root.geometry("500x500")
        self.root.bind('<Return>', self.ok)
        photo = PhotoImage(file=curr_d() + "/icons/background.png")
        background_label = Label(self.root, image=photo)
        background_label.place(x=0, y=0, relwidth=1, relheight=1)

        # LABELS
        user = Label(self.root, text="User_Id  ", fg="white", bg="black")
        password = Label(self.root, text="Password", fg="white", bg="black")

        self.response = Label(self.root,
                              text=self.text,
                              fg="white",
                              bg="black")
        self.response.place(x=165, y=320)
        user.place(x=130, y=220)
        password.place(x=130, y=250)
        self.user_val = StringVar()
        self.pass_val = StringVar()

        #   TEXT FIELD
        user_e = Entry(self.root,
                       textvariable=self.user_val,
                       fg="white",
                       bg="grey11")
        password_e = Entry(self.root,
                           textvariable=self.pass_val,
                           show="*",
                           fg="white",
                           bg="grey11")
        user_e.place(x=198, y=220)
        password_e.place(x=198, y=250)

        # BUTTON
        b1 = Button(self.root,
                    text="ok",
                    command=self.ok,
                    width=25,
                    fg="white",
                    bg="black")
        if staus:
            b1.place(x=135, y=280)

        self.root.mainloop()
Ejemplo n.º 3
0
 def __init__(self):
     self.p = emp_manage_functions()
     self.root = Tk()
     self.client = cloud_manger()
     self.root.geometry("800x410")
     self.root.title("EMPLOYEE UPDATES")
     self.emp_id = Label(self.root, text="EMP_ID:")
     self.emp_id.place(x=0, y=6)
     self.commits_fd = Text(self.root)
     self.emp_id_fd = Entry(self.root)
     self.emp_id_fd.place(x=60, y=5)
     self.commits_fd.place(width=798)
     self.commits_fd.place(x=0, y=40)
     self.get_b = Button(self.root, text="GET", command=self.get, width=10)
     self.get_b.place(x=240, y=3)
     self.root.mainloop()
Ejemplo n.º 4
0
    def __init__(self, emp_id):
        self.instance_emp_mange = emp_manage_functions()
        self.cloud_manger_instance = cloud_manger()
        list_files = self.cloud_manger_instance.available_files()
        self.t = time.strftime('%d/%m/%Y, %H:%M:%S', time.localtime())
        self.emp_id = emp_id
        self.root = tkinter.Tk()
        self.root.geometry("300x125")
        self.root.title("File Download")
        self.get_f = tkinter.Label(self.root,
                                   text="Get available files",
                                   font=('Helvetica', 12, "bold"))
        self.get_f.place(x=80, y=0)
        self.var = tkinter.StringVar(self.root)
        self.get_file_fd = tkinter.OptionMenu(self.root, self.var, *list_files)
        self.get_file_fd.config(text="Avaialable files",
                                width=28,
                                height=1,
                                font=('Helvetica', 12))
        self.get_file_fd.place(x=0, y=35)
        self.var.set("Avail files")
        self.get = tkinter.Button(self.root,
                                  text="Download",
                                  command=self.ok,
                                  width=10)
        self.get.place(x=40, y=68)
        self.close = tkinter.Button(self.root,
                                    text="CLOSE",
                                    command=self.close,
                                    width=10)
        self.close.place(x=155, y=68)
        self.file_path = tkinter.Label(self.root, text="File path")
        self.file_path_fd = tkinter.Entry(self.root)
        self.file_path.place(x=0, y=100)
        self.file_path_fd.place(width=230)
        self.file_path_fd.place(x=65, y=100)
        self.file_path_fd.insert(tkinter.END,
                                 os.path.expanduser("~") + "/Downloads/")

        self.root.mainloop()
Ejemplo n.º 5
0
    def __init__(self):
        sync(1)
        self.p = emp_manage_functions()
        self.cloud = cloud_manger()
        self.root = Tk()
        self.root.geometry("350x170")
        self.root.minsize(350, 170)
        self.root.maxsize(350, 170)
        self.root.title("ADD EMPLOYEE")

        # LAYOUT
        self.emp_id_lb = Label(self.root, text="Employee id *")
        self.emp_id_lb.place(x=1, y=1)
        self.emp_id = Entry(self.root)
        self.emp_id.place(x=150, y=1)
        self.emp_name = Label(self.root, text="Employee Name *")
        self.emp_name.place(x=1, y=30)
        self.emp_name_fd = Entry(self.root)
        self.emp_name_fd.place(x=150, y=30)
        self.emp_project = Label(self.root, text="Employee Password")
        self.emp_project.place(x=1, y=60)
        self.emp_project_fd = Entry(self.root)
        self.emp_project_fd.place(x=150, y=60)
        self.emp_grade = Label(self.root, text="Employee Grade ")
        self.emp_grade.place(x=1, y=90)
        self.emp_grade_fd = Entry(self.root)
        self.emp_grade_fd.place(x=150, y=90)
        self.emp_project_fd.insert(0, "Password")
        self.emp_grade_fd.insert(0, "0")
        self.response = Label(self.root)
        self.response.place(x=100, y=150)
        self.emp_id.insert(END, self.p.get_last_emp_added() + 1)
        self.emp_id.config(state='readonly')
        self.root.bind('<Return>', self.ok)
        self.b1 = Button(self.root, text="ok", command=self.ok)
        self.b1.place(x=100, y=120)
        self.b2 = Button(self.root, text="Close", command=self.close)
        self.b2.place(x=200, y=120)

        self.root.mainloop()
Ejemplo n.º 6
0
    def __init__(self):
        sync(1)
        self.p = emp_manage_functions()
        self.client = cloud_manger()
        self.root = Tk()
        self.root.geometry("300x100")
        self.root.minsize(300, 100)
        self.root.maxsize(300, 100)
        self.root.title("REMOVE EMPLOYEE")

        # LAYOUT
        self.delete_lab = Label(self.root, text="ENTER EMP_ID")
        self.delete_lab.place(x=1, y=1)
        self.delete_fd = Entry(self.root)
        self.delete_fd.place(x=120, y=1)
        self.delete_bt = Button(self.root, text="Delete", command=self.delete_h)
        self.delete_bt.place(x=60, y=30)
        self.delete_cancel = Button(self.root, text="cancel", command=self.out)
        self.delete_cancel.place(x=150, y=30)
        self.delete_response = Label(self.root, text="!!Check before deleting")
        self.delete_response.place(x=60, y=70)
        self.root.bind('<Return>', self.delete_h)
        self.root.mainloop()
Ejemplo n.º 7
0
from tkinter import *
import sqlite3
from admin.cloud_manager import cloud_manger
import os



def curr_d():
    x = os.path.split(os.getcwd())
    return x[0]


cloud = cloud_manger()


def sync(i):
    if i == 1:
        cloud.database_sync_get()
    else:
        cloud.database_sync_set()


class project_handel_func:
    def __init__(self):
        self.db = sqlite3.connect(curr_d()+'/admin/oms.db')
        self.cursor = self.db.cursor()

    def reconnect(self):
        self.db = sqlite3.connect(curr_d()+'/admin/oms.db')
        self.cursor = self.db.cursor()
Ejemplo n.º 8
0
 def __init__(self):
     self.db = sqlite3.connect(curr_d() + '/admin/oms.db')
     self.cursor = self.db.cursor()
     self.p = project_handel_func()
     self.c = cloud_manger()
Ejemplo n.º 9
0
    def __init__(self):
        self.root = Tk()
        self.c = cloud_manger()
        self.c.database_sync_get()
        from admin import employee_manger, project_manger
        self.e = employee_manger.emp_manage_functions()
        self.p = project_manger.project_handel_func()
        emp_id = 0
        self.root.geometry("1000x589")
        self.root.title("ADMIN HANDLE")
        photo = PhotoImage(file=curr_d() + "/icons/admin_bg.png")
        background_label = Label(self.root, image=photo)
        background_label.place(x=0, y=0, relwidth=1, relheight=1)
        # LABELS
        head = Label(self.root, text="Menu", font=('Helvetica', 18, 'bold', 'underline'), bg='black', fg='white')
        head.place(x=460, y=40)
        # BUTTON
        project = Button(self.root, text="Project list", width=20, height=2, bg='black', fg='white',
                         font=('Helvetica', 11, 'bold'),
                         command=project_manger.proj_list)
        project.place(x=0, y=390)
        emp = Button(self.root, text="Employee Performance", width=20, height=2, bg='black', fg='white',
                     font=('Helvetica', 11, 'bold'), command=employee_manger.emp_performance_set)
        emp.place(x=0, y=75)
        add = Button(self.root, text="Add Employee", width=20, height=2, bg='black', fg='white',
                     font=('Helvetica', 11, 'bold'), command=employee_manger.add_emp)
        add.place(x=0, y=120)
        remove = Button(self.root, text="Remove  Employee", width=20, height=2, bg='black', fg='white',
                        font=('Helvetica', 11, 'bold'),
                        command=employee_manger.del_emp)
        remove.place(x=0, y=165)
        assign = Button(self.root, text="Add Project", width=20, height=2, bg='black', fg='white',
                        font=('Helvetica', 11, 'bold'), command=project_manger.add_new_project)
        assign.place(x=0, y=210)
        emp_grade = Button(self.root, text="Employee Ranking", width=20, height=2, bg='black', fg='white',
                           font=('Helvetica', 11, 'bold'), command=employee_manger.complete_emp_list)
        emp_grade.place(x=0, y=255)
        search = Button(self.root, text="Search", width=20, height=2, bg='black', fg='white',
                        font=('Helvetica', 11, 'bold'),
                        command=details)
        search.place(x=0, y=300)

        feedback = Button(self.root, text="Feedback", width=20, height=2, bg='black', fg='white',
                          font=('Helvetica', 11, 'bold'),
                          command=employee_manger.feedback)
        feedback.place(x=810, y=119)

        set_meeting_id = Button(self.root, text="Meeting id", width=20, height=2, bg='black', fg='white',
                                font=('Helvetica', 11, 'bold'),
                                command=self.meeting_id)
        set_meeting_id.place(x=810, y=255)
        enter_meeting = Button(self.root, text="Meeting id", width=20, height=2, bg='black', fg='white',
                               font=('Helvetica', 11, 'bold'),
                               command=self.meeting_id)
        enter_meeting.place(x=810, y=255)
        self.site_var = StringVar()
        self.site_var.set("Set down")
        self.site_down = Button(self.root, textvariable=self.site_var, width=20, height=2, bg='black', fg='white',
                                font=('Helvetica', 11, 'bold'), command=self.site)
        self.site_down.place(x=810, y=164)

        emp_working = Label(text="No. of emp working   :", font=('Helvetica', 11, 'bold'), fg="white", bg="black")
        emp_working.place(x=300, y=80)
        emp_working_fd = Entry(self.root)
        emp_working_fd.place(x=500, y=80)
        emp_working_fd.insert(END, self.e.get_no_of_emp())

        total_proj = Label(text="Total no of project     :", font=('Helvetica', 11, 'bold'), fg="white", bg="black")
        total_proj.place(x=300, y=110)
        total_proj_fd = Entry(self.root)
        total_proj_fd.place(x=500, y=110)
        total_proj_fd.insert(END, self.p.get_no_of_proj())

        total_proj_active = Label(text="Completed project     :", font=('Helvetica', 11, 'bold'), fg="white",
                                  bg="black")
        total_proj_active.place(x=300, y=140)
        total_proj_active_fd = Entry(self.root)
        total_proj_active_fd.place(x=500, y=140)
        total_proj_active_fd.insert(END, self.p.get_no_of_proj_done())

        dropbox_token = Label(text="Dropbox Token          :", font=('Helvetica', 11, 'bold'), fg="white", bg="black")
        dropbox_token.place(x=300, y=170)
        dropbox_token_fd = Entry(self.root)
        dropbox_token_fd.place(x=500, y=170)
        dropbox_token_fd.insert(END, self.c.token)

        database_check_employee = Label(text="Emp database check :", font=('Helvetica', 11, 'bold'), fg="white",
                                        bg="black")
        database_check_employee.place(x=300, y=200)
        database_check_employee_fd = Entry(self.root)
        database_check_employee_fd.place(x=500, y=200)
        if self.e.get_no_of_emp() != "0":
            database_check_employee_fd.insert(END, "Connected")
        else:
            database_check_employee_fd.insert(END, "Not connected")

        database_check_project = Label(text="Proj database check  :", font=('Helvetica', 11, 'bold'), fg="white",
                                       bg="black")
        database_check_project.place(x=300, y=230)
        database_check_project_fd = Entry(self.root)
        database_check_project_fd.place(x=500, y=230)
        if self.p.get_no_of_proj_done() != "0":
            database_check_project_fd.insert(END, "Connected")
        else:
            database_check_project_fd.insert(END, "Not connected")

        database_check_salary = Label(text="Sal database check    :", font=('Helvetica', 11, 'bold'), fg="white",
                                      bg="black")
        database_check_salary.place(x=300, y=260)
        database_check_salary_fd = Entry(self.root)
        database_check_salary_fd.place(x=500, y=260)
        if "0" != self.e.sal_check():
            database_check_salary_fd.insert(END, "Connected")
        else:
            database_check_salary_fd.insert(END, "Not connected")

        cloud_b = Button(self.root, text="Upload", width=20, height=2, bg='black', fg='white',
                         font=('Helvetica', 11, 'bold'),
                         command=self.upload_i)
        cloud_b.place(x=0, y=345)
        close = Button(self.root, text="x", font=('Helvetica', 11, 'bold'), command=exit)
        close.place(x=0, y=0)
        download_b = Button(self.root, text="Download", width=20, height=2, bg='black', fg='white',
                            font=('Helvetica', 11, 'bold'),
                            command=self.download)
        download_b.place(x=810, y=210)
        commit = Button(self.root, text="Status", width=20, height=2, bg='black', fg='white',
                        font=('Helvetica', 11, 'bold'),
                        command=employee_manger.full_list_upload_download)
        commit.place(x=810, y=75)

        commit = Button(self.root, text="Attendance", width=20, height=2, bg='black', fg='white',
                        font=('Helvetica', 11, 'bold'),
                        command=employee_manger.attendance_cntrl)
        commit.place(x=810, y=300)

        colleague_info = Label(text="Colleague(Limited user) v2.0\n(Class implementation,Proctoring,Conflict "
                                    "handling)\nServices used "
                                    ":Cloud(Dropbox)\nProctoring:OpenCv\nDevelopers:\nAdarsh Singh\nAbhay Pratap "
                                    "Singh\nGyan Prakash Kushwaha\nAkhilesh Kumar",
                               bg='black', fg='white', font=('Helvetica', 11, 'bold'))
        colleague_info.place(x=310, y=300)
        self.root.mainloop()