Exemplo n.º 1
0
 def __input_employee_info(self):
     employee = EmployeeModel()
     employee.name = input("请输入姓名:")
     employee.money = self.__get_int("请输入工资:")
     employee.age = self.__get_int("请输入年龄:")
     self.__controller.add_employee_info(employee)
     print("录入成功啦!")
Exemplo n.º 2
0
 def __input_employee_info(self):
     emp = EmployeeModel()
     emp.name = input("请输入员工姓名:")
     emp.did = self.__get_int("请输入部门编号:")
     emp.money = self.__get_int("请输入员工薪资:")
     self.__controller.add_employee_info(emp)
     print("添加员工生成功喽")
Exemplo n.º 3
0
 def __input_employee_info(self):
     emp = EmployeeModel()
     emp.did = self.__get_number("请输入员工部门编号:")
     emp.name = input("请输入员工姓名:")
     emp.money = self.__get_number("请输入员工薪资:")
     self.__controller.add_employee(emp)
     print("添加成功")
Exemplo n.º 4
0
 def __input_employee(self):
     employee = EmployeeModel()
     employee.name = input("请输入员工姓名:")
     # employee.did = int(input("请输入部门编号:"))
     employee.did = self.get_number("请输入部门编号:")
     employee.money = self.get_number("请输入员工薪资:")
     self.__controller.add_employee(employee)
Exemplo n.º 5
0
 def remove_employee(self, eid):
     employee = EmployeeModel(eid)
     if employee in self.__list_employee:
         self.__list_employee.remove(employee)
         return True
     else:
         return False
Exemplo n.º 6
0
 def remove_employee(self, eid):
     emp = EmployeeModel(eid)
     if emp in self.__list_employees:
         self.__list_employees.remove(emp)
         return True
     else:
         return False
 def add_employeesmodel(self):
     Employee_Num = View.get_data('Employee_Num')
     Employee_Lastname = View.get_data('Employee_Lastname')
     Employee_Firstname = View.get_data('Employee_Firstname')
     Employee_Patronumic = View.get_data('Employee_Patronumic')
     Employee_Position = View.get_data('Employee_Position')
     employeemodel = EmployeeModel.Add_employee(Employee_Num,
                                                Employee_Lastname,
                                                Employee_Firstname,
                                                Employee_Patronumic,
                                                Employee_Position)
 def change_info_employeesmodel(self):
     Employee_Num = View.get_data('Employee_Num')
     Employee_Lastname = View.get_data('Employee_Lastname')
     Employee_Firstname = View.get_data('Employee_Firstname')
     Employee_Patronumic = View.get_data('Employee_Patronumic')
     Employee_Position = View.get_data('Employee_Position')
     employeemodel = EmployeeModel.Change_employee(Employee_Num,
                                                   Employee_Lastname,
                                                   Employee_Firstname,
                                                   Employee_Patronumic,
                                                   Employee_Position)
     return View.change_info_employeesmodel(employeemodel)
Exemplo n.º 9
0
 def __adjust_employee(self):
     new_employee = EmployeeModel()
     eid = int(input("请输入员工原编号:"))
     new_employee.eid = int(input("请输入员工编号:"))
     new_employee.did = int(input("请输入部门编号:"))
     new_employee.name = input("请输入员工姓名:")
     new_employee.money = int(input("请输入员工薪资:"))
     self.__controller.adjusted_employee(eid, new_employee)
Exemplo n.º 10
0
 def __input_employee(self):
     """获取信息后向业务方传递,以一个封装对象传递,封装数据;数据模型装终端输入的多个数据信息"""
     employee = EmployeeModel()  #输入的数据封装成数据模型,包装后传递给业务
     employee.eid = self.judge("请输入员工编号:")
     employee.did = int(input("请输入部门编号:"))
     employee.name = input("请输入员工姓名:")
     employee.money = int(input("请输入员工薪资:"))
     self.__controller.add_employee(employee)
Exemplo n.º 11
0
 def __modify_employee(self):
     employee = EmployeeModel()
     employee.eid = int(input("请重新输入员工编号:"))
     employee.name = input("请重新输入员工姓名:")
     employee.age = self.__get_int("请重新输入员工年龄:")
     employee.money = self.__get_int("请重新输入员工工资:")
     if self.__controller.updte_employee(employee):
         print("修改成功")
     else:
         print("修改失败")
Exemplo n.º 12
0
 def __modify_employee(self):
     emp = EmployeeModel()
     emp.eid = self.__get_int("请输入员工编号:")
     emp.name = input("请输入员工姓名:")
     emp.did = self.__get_int("请输入部门编号:")
     emp.money = self.__get_int("请输入员工薪资:")
     if self.__controller.update_employee_info(emp):
         print("更新成功")
     else:
         print("更新失败")
Exemplo n.º 13
0
    def __modify_employee(self):
        employee = EmployeeModel()
        employee.eid = self.get_number("请输入需要修改的员工编号:")
        employee.name = input("请输入需要修改的员工姓名:")
        employee.did = self.get_number("请输入需要修改的部门编号:")
        employee.money = self.get_number("请输入需要修改的员工薪资:")

        if self.__controller.update_employee(employee):
            print("修改成功")
        else:
            print("修改失败")
Exemplo n.º 14
0
 def add_employee(self, employee: EmployeeModel):
     employee.eid = self.__start_eid
     self.__list_employees.append(employee)
     self.__start_eid += 1
 def delete_employeesmodel(self):
     num = View.get_data('Employee_Num')
     employeemodel = EmployeeModel.Delete_employee(num)
     return View.delete_employeesmodel(employeemodel)
 def show_employeesmodel(self):
     employeemodel = EmployeeModel.Get_employees()
     return View.show_employeesmodel(employeemodel)
Exemplo n.º 17
0
 def remove_employee(self, target_eid):
     emp = EmployeeModel(target_eid)
     if emp in self.__employee_list:
         self.__employee_list.remove(emp)
         return True
     return False