public static function cancelAdjustment($period_id, $staff_id, $period_date)
 {
     $result = Acad_Model_DbTable_Timetable::getPeriodIdTimetable($period_id, $period_date, $staff_id);
     $where = "source_staff_id='{$staff_id}'";
     $where .= "AND start_date='{$period_date}'";
     $where .= 'AND ( ';
     $or_stmt = '';
     foreach ($result as $column => $value) {
         $or_stmt = $or_stmt . 'source_timetable_id= ' . $value['timetable_id'];
         if (!($column == count($result) - 1)) {
             $or_stmt .= ' OR ';
         }
     }
     $or_stmt .= ')';
     $where = $where . $or_stmt;
     return self::getDefaultAdapter()->delete(self::TABLE_NAME, $where);
 }
 public function getdepartmentfacultyAction()
 {
     $request = $this->getRequest();
     $department_id = $request->getParam('department_id');
     if (isset($department_id)) {
         $resultSet = Acad_Model_DbTable_Timetable::getDepartmentSubjectFaculty($department_id);
         $this->_helper->json($resultSet);
     }
 }