Skip to content
Permalink
main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
class UpdateEmployeeCommand:
def __init__(self, empid, name, email, phone, address, service, joining_date, travel, db):
self.empid = empid
self.name = name
self.email = email
self.phone = phone
self.address = address
self.service = service
self.joining_date = joining_date
self.travel = travel
self.db = db
def execute(self):
self.db.execute(
'update sch set name = ?, email =? , phone = ? , address = ? , service = ? ,joining_date = ?, travel = ? where empid = ?',
[self.name, self.email, self.phone, self.address, self.service, self.joining_date, self.travel, self.empid])
self.db.commit()
def undo(self):
# Implement undo logic here if needed
pass
def redo(self):
# Implement redo logic here if needed
pass