public function SaveExemptionMaster(Exemption $exemption) { try { $SQL = self::$INSERT; $conn = self::$db->getConnection(); $stmt = $conn->prepare($SQL); $stmt->bindValue(':folderseq', $exemption->getFolderSeq()); $stmt->bindValue(':dated', $exemption->getDated()); $stmt->bindValue(':fromdate', $exemption->getFromDateRange()); $stmt->bindValue(':todate', $exemption->getToDateRange()); $stmt->bindValue(':userseq', $exemption->getUserSeq()); $stmt->bindValue(':isapproved', $exemption->getIsApproved()); $stmt->bindValue(':approvedon', $exemption->getApprovedOn()); $stmt->bindValue(':comments', $exemption->getComments()); $stmt->bindValue(':approvalcomments', $exemption->getApprovalComments()); $stmt->bindValue(':isExemption', $exemption->getIsExemption()); $stmt->execute(); $error = $stmt->errorInfo(); if ($error[0] == "00000") { return self::$db->getLastInsertedId(); } } catch (Exception $e) { $e; } }