def mod_ajax(): data = request.get_json() empno = data['empno'] name = data['name'] department = data['department'] phone = data['phone'] cnt = MyEmpDao().updEmp(empno, name, department, phone) result = "success" if cnt==1 else "fail" return jsonify(result = result)
def del_ajax(): data = request.get_json() print(data) sabun = data['sabun'] name = data['name'] dept = data['dept'] mobile = data['mobile'] cnt = MyEmpDao().delEmp(sabun) result = "fail" if cnt == 1: result = "success" return jsonify(result=result)
def del_ajax(): data = request.get_json() empno = data['empno'] cnt = MyEmpDao().delEmp(empno) result = "success" if cnt==1 else "fail" return jsonify(result = result)
def emp(): empList = MyEmpDao().getEmps(); return render_template("emp02.html", empList=empList)
def index(): list = MyEmpDao().getEmp() return render_template("emp.html", list=list)