本文整理匯總了PHP中Gender::insertGender方法的典型用法代碼示例。如果您正苦於以下問題:PHP Gender::insertGender方法的具體用法?PHP Gender::insertGender怎麽用?PHP Gender::insertGender使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Gender
的用法示例。
在下文中一共展示了Gender::insertGender方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: Transaction
// Simplificar la ruta de propiedades
$v_label = $property["pages"]["person/gender_admin"];
$v_label_list = $property["pages"]["general_list"];
// Simplificar el ruteo de edicion/visualizacion
$v_route_edit_preview = 'index.php?page=person/gender';
// Simplificar el ruteo de insert
$v_route_insert = '?page=person/gender';
// Simplificar el ruteo de lista
$v_route_list = 'index.php?page=person/gender_admin';
switch ($action) {
case 'INSERT':
$transaction = new Transaction($registry[$nameDataBase]);
Gender::setDataOperationBusiness($registry[$nameDataBase]);
$idTransaction = $transaction->insertTransaction(array(Gender::$business, Gender::$insert, Gender::$descriptionBusiness));
$data = array($_POST['NAME']);
$statusTransactionDB = $catalog->insertGender($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]);
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 {