本文整理汇总了PHP中Transaction::insertTransaction方法的典型用法代码示例。如果您正苦于以下问题:PHP Transaction::insertTransaction方法的具体用法?PHP Transaction::insertTransaction怎么用?PHP Transaction::insertTransaction使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Transaction
的用法示例。
在下文中一共展示了Transaction::insertTransaction方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Response
<?php
$response = new Response($registry[$nameDataBase]);
$consultation = new Consultations($registry[$nameDataBase]);
if (isset($_POST['ACTION']) && $_POST['ACTION'] == 'INSERT' && $_POST['ENTITY'] == 'REQUEST_RESPONSE') {
$res = 0;
$transaction = new Transaction($registry[$nameDataBase]);
Consultations::setDataOperationBusiness($registry[$nameDataBase]);
$idTransaction = $transaction->insertTransaction(array(Response::$business, Response::$insert, Response::$descriptionBusiness));
/*
*
* response, datetime_response,
level, parent_response, fk_id_consultation, fk_id_query_area,
fk_id_educational_role, resp_fk_id_deputy_director,
resp_fk_id_psychologist, resp_fk_id_headmaster,
resp_fk_id_board_directors, resp_fk_id_student,
resp_fk_id_holder, resp_fk_id_teacher, state_satisfaction
*/
$fk_id_educational_role = $_SESSION["pk_id_educational_role"];
$resp_fk_id_deputy_director = NULL;
$resp_fk_id_psychologist = NULL;
$resp_fk_id_headmaster = NULL;
$resp_fk_id_board_directors = NULL;
$resp_fk_id_student = NULL;
$resp_fk_id_holder = NULL;
$resp_fk_id_teacher = NULL;
if ($_SESSION["pk_id_role"] == User::ROLE_ESTUDIANTE) {
$resp_fk_id_student = $_SESSION["pk_id_student"];
}
if ($_SESSION["pk_id_role"] == User::ROLE_PROFESOR) {
$resp_fk_id_teacher = $_SESSION["pk_id_teacher"];
示例2: Transaction
case 'EDIT':
$transaction = new Transaction($registry[$nameDataBase]);
GradeEducation::setDataOperationBusiness($registry[$nameDataBase]);
$idTransaction = $transaction->insertTransaction(array(GradeEducation::$business, GradeEducation::$update, GradeEducation::$descriptionBusiness));
$data = array($_POST['NAME'], $_POST['EDIT']);
$statusTransactionDB = $catalog->updateGradeEducation($data, $idTransaction);
if ($statusTransactionDB > 0) {
Forms::setMessage('SUCCESS', $v_label["SHORT_MESSAGE_OK_EDIT"], $v_label["DETAIL_MESSAGE_OK_EDIT"]);
} else {
Forms::setMessage('ERROR', $v_label["SHORT_MESSAGE_NOOK_EDIT"], $v_label["DETAIL_MESSAGE_NOOK_EDIT"]);
}
break;
case 'DELETE':
$transaction = new Transaction($registry[$nameDataBase]);
GradeEducation::setDataOperationBusiness($registry[$nameDataBase]);
$idTransaction = $transaction->insertTransaction(array(GradeEducation::$business, GradeEducation::$update, GradeEducation::$descriptionBusiness));
$data = array($_GET['DELETE']);
$statusTransactionDB = $catalog->deleteGradeEducation($data, $idTransaction);
if ($statusTransactionDB > 0) {
Forms::setMessage('SUCCESS', $v_label["SHORT_MESSAGE_OK_DELETE"], $v_label["DETAIL_MESSAGE_OK_DELETE"]);
} else {
Forms::setMessage('ERROR', $v_label["SHORT_MESSAGE_NOOK_DELETE"], $v_label["DETAIL_MESSAGE_NOOK_DELETE"]);
}
break;
default:
break;
}
// Obtener lista
$list = $catalog->getListGradeEducation();
?>
<div class="grid_10">
示例3: CourseApplyPeriod
$cursos = $_POST['chk_cursos'];
$cap = new CourseApplyPeriod($registry[$nameDataBase]);
$dsd = $cap->deleteCourseApplyPeriod(array($id_period), $idTransaction);
for ($i = 0; $i < count($cursos); $i++) {
$data_cursos = array($id_period, $cursos[$i]);
$ds = $cap->insertCourseApplyPeriod($data_cursos, $idTransaction);
}
Forms::setMessage('SUCCESS', $v_label["SHORT_MESSAGE_OK_EDIT"], $v_label["DETAIL_MESSAGE_OK_EDIT"]);
} else {
Forms::setMessage('ERROR', $v_label["SHORT_MESSAGE_NOOK_EDIT"], $v_label["DETAIL_MESSAGE_NOOK_EDIT"]);
}
break;
case 'DELETE':
$transaction = new Transaction($registry[$nameDataBase]);
AdmissionPeriod::setDataOperationBusiness($registry[$nameDataBase]);
$idTransaction = $transaction->insertTransaction(array(AdmissionPeriod::$business, AdmissionPeriod::$update, AdmissionPeriod::$descriptionBusiness));
$data = array($_GET['DELETE']);
$statusTransactionDB = $catalog->deleteAdmissionPeriod($data, $idTransaction);
if ($statusTransactionDB > 0) {
Forms::setMessage('SUCCESS', $v_label["SHORT_MESSAGE_OK_DELETE"], $v_label["DETAIL_MESSAGE_OK_DELETE"]);
} else {
Forms::setMessage('ERROR', $v_label["SHORT_MESSAGE_NOOK_DELETE"], $v_label["DETAIL_MESSAGE_NOOK_DELETE"]);
}
break;
default:
break;
}
// Obtener lista
$list = $catalog->getListAdmissionPeriod();
?>
<div class="grid_10">
示例4: Transaction
case 'EDIT':
$transaction = new Transaction($registry[$nameDataBase]);
SupervisorAdmissionArea::setDataOperationBusiness($registry[$nameDataBase]);
$idTransaction = $transaction->insertTransaction(array(SupervisorAdmissionArea::$business, SupervisorAdmissionArea::$update, SupervisorAdmissionArea::$descriptionBusiness));
$data = array($_POST['ID_ADMISSION_AREA'], $_POST['ID_PERSON'], $_POST['ID_STATUS_SUPERVISOR'], $_POST['EDIT']);
$statusTransactionDB = $catalog->updateSupervisorAdmissionArea($data, $idTransaction);
if ($statusTransactionDB > 0) {
Forms::setMessage('SUCCESS', $v_label["SHORT_MESSAGE_OK_EDIT"], $v_label["DETAIL_MESSAGE_OK_EDIT"]);
} else {
Forms::setMessage('ERROR', $v_label["SHORT_MESSAGE_NOOK_EDIT"], $v_label["DETAIL_MESSAGE_NOOK_EDIT"]);
}
break;
case 'DELETE':
$transaction = new Transaction($registry[$nameDataBase]);
SupervisorAdmissionArea::setDataOperationBusiness($registry[$nameDataBase]);
$idTransaction = $transaction->insertTransaction(array(SupervisorAdmissionArea::$business, SupervisorAdmissionArea::$update, SupervisorAdmissionArea::$descriptionBusiness));
$data = array($_GET['DELETE']);
$statusTransactionDB = $catalog->deleteSupervisorAdmissionArea($data, $idTransaction);
if ($statusTransactionDB > 0) {
Forms::setMessage('SUCCESS', $v_label["SHORT_MESSAGE_OK_DELETE"], $v_label["DETAIL_MESSAGE_OK_DELETE"]);
} else {
Forms::setMessage('ERROR', $v_label["SHORT_MESSAGE_NOOK_DELETE"], $v_label["DETAIL_MESSAGE_NOOK_DELETE"]);
}
break;
default:
break;
}
// Obtener lista
$list = $catalog->getListSupervisorAdmissionArea();
?>
<div class="grid_10">
示例5: Transaction
<?php
$transaction = new Transaction($registry[$nameDataBase]);
AssignHCourseHardMatterTeacher::setDataOperationBusiness($registry[$nameDataBase]);
$idTransaction = $transaction->insertTransaction(array(AssignHCourseHardMatterTeacher::$business, AssignHCourseHardMatterTeacher::$insert, AssignHCourseHardMatterTeacher::$descriptionBusiness));
$matterCourse = new AssignHCourseHardMatterTeacher($registry[$nameDataBase]);
if (isset($_POST['ACTION']) && $_POST['ACTION'] == 'INSERT' && $_POST['ENTITY'] == 'ASSIGN_MATTER_TEACHER') {
/*
fk_id_teacher, fk_id_main_course_matter, fk_id_course_hard
*/
$data = array($_POST['FK_ID_TEACHER'], $_POST['FK_ID_MAIN_COURSE_MATTER'], $_POST['PK_ID_COURSE_HARD']);
$pk_id = $matterCourse->insertAssignHCourseHardMatterTeacher($data, $idTransaction);
if ($pk_id > 0) {
Forms::setMessage('SUCCESS', 'Transaccion exitosa!!', 'Los Datos de la asignacion materia docente se guardaron correctamente!');
} else {
Forms::setMessage('ERROR', 'Transaccion erronea!!', 'Los datos de la asignacion materia docente no se pudieron guardar!');
}
}
if (isset($_POST['ACTION']) && $_POST['ACTION'] == 'EDIT' && $_POST['ENTITY'] == 'ASSIGN_MATTER_TEACHER') {
$data = array($_POST['FK_ID_TEACHER'], $_POST['FK_ID_MAIN_COURSE_MATTER'], $_POST['PK_ID_COURSE_HARD'], $_POST['PK_ID_HCOURSE_MATTER_TEACHER']);
// ECHO $_POST['PK_ID_HCOURSE_MATTER_TEACHER'];
$pk_id = $matterCourse->updateAssignHCourseHardMatterTeacher($data, $idTransaction);
if ($pk_id > 0) {
Forms::setMessage('SUCCESS', 'Transaccion exitosa!!', 'Los Datos de la asignacion materia docente se actualizaron correctamente!');
} else {
Forms::setMessage('ERROR', 'Transaccion erronea!!', 'Los datos de la asignacion materia docente no se pudieron actualizar!');
}
}
if (isset($_GET['ACTION']) && $_GET['ACTION'] == 'DELETE' && $_GET['ENTITY'] == 'ASSIGN_MATTER_TEACHER') {
$data = array($_GET['PK_ID_HCOURSE_MATTER_TEACHER']);
示例6: unlink
if (file_exists("upload/cuotas/" . $filename)) {
unlink("upload/cuotas/" . $filename);
}
move_uploaded_file($_FILES["archivo"]["tmp_name"], "upload/cuotas/" . $filename);
$res = 'OK';
}
if ($res == 'OK') {
$opcion = $_POST['id_type_notes'];
//TIPO DE ESTRUCTURA A CARGAR
$filename = "upload/cuotas/" . $filename;
$fp = fopen($filename, "r");
$contador = 0;
//Transaction
$transaction = new Transaction($registry[$nameDataBase]);
CourseNotesBallot::setDataOperationBusiness($registry[$nameDataBase]);
$idTransaction = $transaction->insertTransaction(array(CourseNotesBallot::$business, CourseNotesBallot::$insert, CourseNotesBallot::$descriptionBusiness));
while (!feof($fp)) {
$linea = fgets($fp);
$datos = explode("|", $linea);
switch ($opcion) {
case 1:
$student = new Student($db);
$id_student = $student->getStudentId($datos[1]);
$debt_share = new DebtShare($db);
$data = array(1, $id_student, $datos[0], $datos[3], $datos[4], $datos[5]);
$id = $debt_share->insertDebtShare($data, $idTransaction);
//adicionar la confirmacion o error del insert
//adicionar registro de los logs
$res = $id;
//resultado final
break;
示例7: Transaction
case 'EDIT':
$transaction = new Transaction($registry[$nameDataBase]);
Country::setDataOperationBusiness($registry[$nameDataBase]);
$idTransaction = $transaction->insertTransaction(array(Country::$business, Country::$update, Country::$descriptionBusiness));
$data = array($_POST['NAME'], $_POST['EDIT']);
$statusTransactionDB = $catalog->updateCountry($data, $idTransaction);
if ($statusTransactionDB > 0) {
Forms::setMessage('SUCCESS', $v_label["SHORT_MESSAGE_OK_EDIT"], $v_label["DETAIL_MESSAGE_OK_EDIT"]);
} else {
Forms::setMessage('ERROR', $v_label["SHORT_MESSAGE_NOOK_EDIT"], $v_label["DETAIL_MESSAGE_NOOK_EDIT"]);
}
break;
case 'DELETE':
$transaction = new Transaction($registry[$nameDataBase]);
Country::setDataOperationBusiness($registry[$nameDataBase]);
$idTransaction = $transaction->insertTransaction(array(Country::$business, Country::$update, Country::$descriptionBusiness));
$data = array($_GET['DELETE']);
$statusTransactionDB = $catalog->deleteCountry($data, $idTransaction);
if ($statusTransactionDB > 0) {
Forms::setMessage('SUCCESS', $v_label["SHORT_MESSAGE_OK_DELETE"], $v_label["DETAIL_MESSAGE_OK_DELETE"]);
} else {
Forms::setMessage('ERROR', $v_label["SHORT_MESSAGE_NOOK_DELETE"], $v_label["DETAIL_MESSAGE_NOOK_DELETE"]);
}
break;
default:
break;
}
// Obtener lista
$list = $catalog->getListCountry();
?>
<div class="grid_10">
示例8: elseif
} elseif ($_POST['status_admission_process'] == 34) {
$statusData = array(38, $_POST['fk_id_membership_app_form']);
//print_r($statusData);
$statusTransactionDBStatus = $formObject->updateMembershipAppFormStatusAddmision($statusData, $idTransaction);
}
if ($statusTransactionDB > 0) {
Forms::setMessage('SUCCESS', 'Transaccion exitosa!!', 'Los Datos de Evaluacion del formulario se guardaron correctamente!' . $messageInsertFormData);
} else {
Forms::setMessage('ERROR', 'Transaccion erronea!!', 'Los Datos de Evaluacion del formulario no se pudieron guardar!');
}
}
if (isset($_GET['ACTION']) && $_GET['ACTION'] == 'EDIT' && isset($_GET['pk_id_admission_process']) && $_GET['pk_id_admission_process'] > 0) {
//echo 'entro';
$transaction = new Transaction($registry[$nameDataBase]);
AdmissionProcess::setDataOperationBusiness($registry[$nameDataBase]);
$idTransaction = $transaction->insertTransaction(array(AdmissionProcess::$business, AdmissionProcess::$insert, AdmissionProcess::$descriptionBusiness));
$statusTransactionDB = $process->reactiveAdmissionProcess($_GET['ID_FORM'], $_GET['pk_id_admission_process']);
// El estado en el formulario se coloca a 36='PENDIENTE'
$statusData = array(36, $_GET['ID_FORM']);
//print_r($statusData);
$statusTransactionDBStatus = $formObject->updateMembershipAppFormStatusAddmision($statusData, $idTransaction);
if ($statusTransactionDB > 0) {
Forms::setMessage('SUCCESS', 'Transaccion exitosa!!', 'El proceso de admision se reactivo exitosamente!');
} else {
Forms::setMessage('ERROR', 'Transaccion erronea!!', 'El proceso de admision no se pudo reactivar!');
}
}
$areas = $process->getListAdmissionProcessByAppForm($id_form);
if (count($areas) == 0) {
$active = 0;
}
示例9: Transaction
case 'INSERT':
$transaction = new Transaction($registry[$nameDataBase]);
SeatReservation::setDataOperationBusiness($registry[$nameDataBase]);
$idTransaction = $transaction->insertTransaction(array(SeatReservation::$business, SeatReservation::$insert, SeatReservation::$descriptionBusiness));
$data = array($_POST['pk_id_seat_reservation_period'], $_GET['FK_ID_ASSIGN_HOLDER_STUDENT']);
$statusTransactionDB = $seatReservation->insertSeatReservation($data, $idTransaction);
if ($statusTransactionDB > 0) {
Forms::setMessage('SUCCESS', $v_label["SHORT_MESSAGE_OK_NEW"], $v_label["DETAIL_MESSAGE_OK_NEW"]);
} else {
Forms::setMessage('ERROR', $v_label["SHORT_MESSAGE_NOOK_NEW"], $v_label["DETAIL_MESSAGE_NOOK_NEW"]);
}
break;
case 'EDIT':
$transaction = new Transaction($registry[$nameDataBase]);
SeatReservation::setDataOperationBusiness($registry[$nameDataBase]);
$idTransaction = $transaction->insertTransaction(array(SeatReservation::$business, SeatReservation::$insert, SeatReservation::$descriptionBusiness));
$data = array($_POST['pk_id_seat_reservation_period'], $_GET['FK_ID_ASSIGN_HOLDER_STUDENT']);
$statusTransactionDB = $seatReservation->updateSeatReservation($data, $idTransaction);
if ($statusTransactionDB > 0) {
Forms::setMessage('SUCCESS', $v_label["SHORT_MESSAGE_OK_EDIT"], $v_label["DETAIL_MESSAGE_OK_EDIT"]);
} else {
Forms::setMessage('ERROR', $v_label["SHORT_MESSAGE_NOOK_EDIT"], $v_label["DETAIL_MESSAGE_NOOK_EDIT"]);
}
break;
default:
break;
}
// Obtener lista
$id_person = 2;
if (isset($_SESSION["PK_ID_PERSON"])) {
$id_person = $_SESSION["PK_ID_PERSON"];
示例10: MainCourse
<?php
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
$mainCourse = new MainCourse($registry[$nameDataBase]);
$courseHard = new CourseHard($registry[$nameDataBase]);
$courseHard = new CourseHard($registry[$nameDataBase]);
$matterCourse = new AssignHCourseHardMatterTeacher($registry[$nameDataBase]);
$transaction = new Transaction($registry[$nameDataBase]);
CourseHard::setDataOperationBusiness($registry[$nameDataBase]);
$idTransaction = $transaction->insertTransaction(array(CourseHard::$business, CourseHard::$insert, CourseHard::$descriptionBusiness));
if (isset($_POST['ACTION'])) {
if ($_POST['ACTION'] == 'INSERT' && isset($_POST['ENTITY']) && $_POST['ENTITY'] == 'COURSE_HARD') {
//INSERCION DE NUEVO CURSO
/*
NAME_COURSE, DATE_START, DATE_END,
COMMENTS_ADITIONAL, FK_ID_PERIOD,
FK_ID_MAIN_COURSE, STATUS_COURSE_HARD,
* */
$data = array($_POST['NAME_COURSE'], date('Y-m-d', strtotime(str_replace('/', '-', $_POST['DATE_START']))), date('Y-m-d', strtotime(str_replace('/', '-', $_POST['DATE_END']))), $_POST['COMMENTS_ADITIONAL'], $_POST['FK_ID_PERIOD'], $_POST['FK_ID_MAIN_COURSE'], $_POST['STATUS_COURSE_HARD']);
$pk_id_course_hard = $courseHard->insertCourseHard($data, $idTransaction);
$listMatterCourse = $matterCourse->getListAssignCourseMatterByCourseHard($pk_id_course_hard);
foreach ($listMatterCourse as $item) {
//fk_id_teacher, fk_id_main_course_matter, fk_id_course_hard
$data = array(null, $item['pk_id_main_course_matter'], $pk_id_course_hard);
$pk_id = $matterCourse->insertAssignHCourseHardMatterTeacher($data, $idTransaction);
}
示例11: Transaction
case 'EDIT':
$transaction = new Transaction($registry[$nameDataBase]);
Location::setDataOperationBusiness($registry[$nameDataBase]);
$idTransaction = $transaction->insertTransaction(array(Location::$business, Location::$update, Location::$descriptionBusiness));
$data = array($_POST['NAME'], $_POST['ID_CITY'], $_POST['EDIT']);
$statusTransactionDB = $catalog->updateLocation($data, $idTransaction);
if ($statusTransactionDB > 0) {
Forms::setMessage('SUCCESS', $v_label["SHORT_MESSAGE_OK_EDIT"], $v_label["DETAIL_MESSAGE_OK_EDIT"]);
} else {
Forms::setMessage('ERROR', $v_label["SHORT_MESSAGE_NOOK_EDIT"], $v_label["DETAIL_MESSAGE_NOOK_EDIT"]);
}
break;
case 'DELETE':
$transaction = new Transaction($registry[$nameDataBase]);
Location::setDataOperationBusiness($registry[$nameDataBase]);
$idTransaction = $transaction->insertTransaction(array(Location::$business, Location::$update, Location::$descriptionBusiness));
$data = array($_GET['DELETE']);
$statusTransactionDB = $catalog->deleteLocation($data, $idTransaction);
if ($statusTransactionDB > 0) {
Forms::setMessage('SUCCESS', $v_label["SHORT_MESSAGE_OK_DELETE"], $v_label["DETAIL_MESSAGE_OK_DELETE"]);
} else {
Forms::setMessage('ERROR', $v_label["SHORT_MESSAGE_NOOK_DELETE"], $v_label["DETAIL_MESSAGE_NOOK_DELETE"]);
}
break;
default:
break;
}
// Obtener lista
$list = $catalog->getListLocation();
?>
<div class="grid_10">
示例12: array
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!');
} else {
Forms::setMessage('ERROR', 'Transaccion erronea!!', 'Los datos de la actividad no se pueden eliminar!!!!!!');
}
}
$_SESSION['PK_ID_COURSE_HARD'] = $_GET['PK_ID_COURSE_HARD'];
//if($_SESSION['pk_id_role']==ROLE_TITULAR) $list = $activity->getListActivityByHolder($_SESSION['pk_id_holder']);
//if($_SESSION['pk_id_role']==ROLE_PROFESOR) $list = $activity->getListActivityByTeacherCourseHard($_GET['PK_ID_COURSE_HARD'],$_SESSION['pk_id_person'] );
?>
<div class="grid_10">
<div class="box round first">
<h2><?php
示例13: Transaction
case 'EDIT':
$transaction = new Transaction($registry[$nameDataBase]);
Gender::setDataOperationBusiness($registry[$nameDataBase]);
$idTransaction = $transaction->insertTransaction(array(Gender::$business, Gender::$update, Gender::$descriptionBusiness));
$data = array($_POST['NAME'], $_POST['EDIT']);
$statusTransactionDB = $catalog->updateGender($data, $idTransaction);
if ($statusTransactionDB > 0) {
Forms::setMessage('SUCCESS', $v_label["SHORT_MESSAGE_OK_EDIT"], $v_label["DETAIL_MESSAGE_OK_EDIT"]);
} else {
Forms::setMessage('ERROR', $v_label["SHORT_MESSAGE_NOOK_EDIT"], $v_label["DETAIL_MESSAGE_NOOK_EDIT"]);
}
break;
case 'DELETE':
$transaction = new Transaction($registry[$nameDataBase]);
Gender::setDataOperationBusiness($registry[$nameDataBase]);
$idTransaction = $transaction->insertTransaction(array(Gender::$business, Gender::$update, Gender::$descriptionBusiness));
$data = array($_GET['DELETE']);
$statusTransactionDB = $catalog->deleteGender($data, $idTransaction);
if ($statusTransactionDB > 0) {
Forms::setMessage('SUCCESS', $v_label["SHORT_MESSAGE_OK_DELETE"], $v_label["DETAIL_MESSAGE_OK_DELETE"]);
} else {
Forms::setMessage('ERROR', $v_label["SHORT_MESSAGE_NOOK_DELETE"], $v_label["DETAIL_MESSAGE_NOOK_DELETE"]);
}
break;
default:
break;
}
// Obtener lista
$list = $catalog->getListGender();
?>
<div class="grid_10">
示例14: Consultations
</script>
<?php
//getListAssignHCourseHardMatterTeacherByCourseHard
$consultation = new Consultations($registry[$nameDataBase]);
$whosConsultation = $consultation->getWhosConsultationByRole($_SESSION["pk_id_educational_role"]);
if (isset($_POST['ACTION']) && $_POST['ACTION'] == 'INSERT' && $_POST['ENTITY'] == 'COURSE_CONSULTATION' && count($whosConsultation) > 0) {
//1 id area del flujo par ainiciar conslta
$flowData = $consultation->getListAllFlowData($_SESSION["pk_id_educational_role"], 1);
$flowData = $flowData[0];
$res = 0;
$whosConsultation = $whosConsultation[0];
// $holder = new Holder($instanceDataBase)
$transaction = new Transaction($registry[$nameDataBase]);
Consultations::setDataOperationBusiness($registry[$nameDataBase]);
$matterCourse = new AssignHCourseHardMatterTeacher($registry[$nameDataBase]);
$idTransaction = $transaction->insertTransaction(array(Consultations::$business, Consultations::$insert, Consultations::$descriptionBusiness));
/*
* subject, consultation, datetime_consultation,
fk_id_hcourse_matter_teacher, fk_id_flow_type_query,
fk_id_educational_role, cons_fk_id_teacher, cons_fk_id_holder,
cons_fk_id_student, fk_id_response_area, satisfy_fk_id_response,
*/
$pk_id_student = null;
if ($_POST['cons_fk_id_student'] > 0) {
$pk_id_student = $_POST['cons_fk_id_student'];
}
$pk_id_holder = null;
if ($_POST['cons_fk_id_holder'] > 0) {
$pk_id_holder = $_POST['cons_fk_id_holder'];
}
$dataAssignHCourseMatterTEacher = $matterCourse->getListAssignHCourseHardMatterTeacher($_POST['fk_id_hcourse_matter_teacher']);
示例15: Transaction
case 'EDIT':
$transaction = new Transaction($registry[$nameDataBase]);
MainCourse::setDataOperationBusiness($registry[$nameDataBase]);
$idTransaction = $transaction->insertTransaction(array(MainCourse::$business, MainCourse::$update, MainCourse::$descriptionBusiness));
$data = array($_POST['name'], $_POST['course_code'], $_POST['description'], $_POST['is_abstract_course'], $_POST['is_course_configuration'], $_POST['status_main_course'], $_POST['data_1'], $_POST['data_2'], $_POST['data_3'], $_POST['data_4'], $_POST['data_5'], $_POST['pk_id_main_course']);
$statusTransactionDB = $catalog->updateMainCourse($data, $idTransaction);
if ($statusTransactionDB > 0) {
Forms::setMessage('SUCCESS', $v_label["SHORT_MESSAGE_OK_EDIT"], $v_label["DETAIL_MESSAGE_OK_EDIT"]);
} else {
Forms::setMessage('ERROR', $v_label["SHORT_MESSAGE_NOOK_EDIT"], $v_label["DETAIL_MESSAGE_NOOK_EDIT"]);
}
break;
case 'DELETE':
$transaction = new Transaction($registry[$nameDataBase]);
MainCourse::setDataOperationBusiness($registry[$nameDataBase]);
$idTransaction = $transaction->insertTransaction(array(MainCourse::$business, MainCourse::$update, MainCourse::$descriptionBusiness));
$data = array($_GET['DELETE']);
$statusTransactionDB = $catalog->deleteMainCourse($data, $idTransaction);
if ($statusTransactionDB > 0) {
Forms::setMessage('SUCCESS', $v_label["SHORT_MESSAGE_OK_DELETE"], $v_label["DETAIL_MESSAGE_OK_DELETE"]);
} else {
Forms::setMessage('ERROR', $v_label["SHORT_MESSAGE_NOOK_DELETE"], $v_label["DETAIL_MESSAGE_NOOK_DELETE"]);
}
break;
default:
break;
}
// Obtener lista
$list = $catalog->getListMainCourse();
?>
<div class="grid_10">