$idTransaction = $transaction->insertTransaction(array(PlanificationActivity::$business, PlanificationActivity::$insert, PlanificationActivity::$descriptionBusiness));
    $data = array($_POST['activity'], date('Y-m-d', strtotime(str_replace('/', '-', $_POST['activity_start_datetime']))), date('Y-m-d', strtotime(str_replace('/', '-', $_POST['activity_end_datetime']))), $_POST['activity_description'], $_POST['pk_id_type_planification_activity'], $_POST['pk_id_hcourse_matter_teacher']);
    $res = $activity->insertPlanificationActivity($data, $idTransaction);
    if ($res > 0) {
        Forms::setMessage('SUCCESS', 'Transaccion exitosa!!', 'La Actividad se registro exitosamente!');
    } else {
        Forms::setMessage('ERROR', 'Transaccion erronea!!', 'Los datos de la actividad no se pudieron registrar!');
    }
}
if (isset($_POST['ACTION']) && $_POST['ACTION'] == 'EDIT' && $_POST['ENTITY'] == 'ACTIVITY') {
    $res = 0;
    $transaction = new Transaction($registry[$nameDataBase]);
    PlanificationActivity::setDataOperationBusiness($registry[$nameDataBase]);
    $idTransaction = $transaction->insertTransaction(array(PlanificationActivity::$business, PlanificationActivity::$insert, PlanificationActivity::$descriptionBusiness));
    $data = array($_POST['activity'], date('Y-m-d', strtotime(str_replace('/', '-', $_POST['activity_start_datetime']))), date('Y-m-d', strtotime(str_replace('/', '-', $_POST['activity_end_datetime']))), $_POST['activity_description'], $_POST['pk_id_type_planification_activity'], $_POST['pk_id_hcourse_matter_teacher'], $_POST['pk_id_planification_activity']);
    $res = $activity->updatePlanificationActivity($data, $idTransaction);
    if ($res > 0) {
        Forms::setMessage('SUCCESS', 'Transaccion exitosa!!', 'La actividad se actualizo exitosamente!');
    } else {
        Forms::setMessage('ERROR', 'Transaccion erronea!!', 'Los datos de la actividad no se pudieron actualizar!');
    }
}
//ELIMINAR
if (isset($_GET['ACTION']) && $_GET['ACTION'] == 'DELETE' && isset($_GET['DELETE'])) {
    $res = 0;
    $transaction = new Transaction($registry[$nameDataBase]);
    PlanificationActivity::setDataOperationBusiness($registry[$nameDataBase]);
    $idTransaction = $transaction->insertTransaction(array(PlanificationActivity::$business, PlanificationActivity::$insert, PlanificationActivity::$descriptionBusiness));
    $res = $activity->deletePlanificationActivity(array($_GET['DELETE']), $idTransaction);
    if ($res > 0) {
        Forms::setMessage('SUCCESS', 'Transaccion exitosa!!', 'La actividad fue eliminada correctamente!');