[add] Delete employee

This commit is contained in:
2018-08-06 03:33:18 -06:00
parent 57ee1fbd72
commit ba307555f0
2 changed files with 24 additions and 0 deletions

View File

@@ -387,5 +387,22 @@ class EmployeeApplication{
return $response;
}
function disableEmployeeRecord($idEmployee){
try {
$stmt = $this->pdo->prepare("UPDATE employees
SET
status = 'INACTIVE'
WHERE
id = :idEmployee");
$this->pdo->beginTransaction();
$stmt->execute(array(':idEmployee' => $idEmployee));
$this->pdo->commit();
$stmt = null;
} catch( PDOExecption $e ) {
$this->pdo->rollback();
}
}
}
?>