本文整理汇总了PHP中Application_Model_DbTable_DbGlobal::getDeptById方法的典型用法代码示例。如果您正苦于以下问题:PHP Application_Model_DbTable_DbGlobal::getDeptById方法的具体用法?PHP Application_Model_DbTable_DbGlobal::getDeptById怎么用?PHP Application_Model_DbTable_DbGlobal::getDeptById使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Application_Model_DbTable_DbGlobal
的用法示例。
在下文中一共展示了Application_Model_DbTable_DbGlobal::getDeptById方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: editAction
public function editAction()
{
if ($this->getRequest()->isPost()) {
try {
$_data = $this->getRequest()->getPost();
$_dbmodel = new Application_Model_DbTable_DbDept();
$_dbmodel->UpdateDepartment($_data);
Application_Form_FrmMessage::Sucessfull("ការកៃប្រែដោយជោគជ័យ !", "/global/faculty/index");
//$this->_redirect("");
} catch (Exception $e) {
$err = $e->getMessage();
Application_Form_FrmMessage::message("Application Error!");
Application_Model_DbTable_DbUserLog::writeMessageError($err);
echo $e->getMessage();
exit;
}
}
$id = $this->getRequest()->getParam("id");
$_db = new Application_Model_DbTable_DbGlobal();
$_row = $_db->getDeptById($id);
$frm = new Application_Form_FrmOther();
$frm->FrmAddDept($_row);
Application_Model_Decorator::removeAllDecorator($frm);
$this->view->frm_dept = $frm;
}
示例2: indexAction
public function indexAction()
{
try {
if ($this->getRequest()->isPost()) {
$_data = $this->getRequest()->getPost();
$search = array('title' => $session_servicetype->txtsearch, 'txtsearch' => $_data['title'], 'status' => $_data['status_search'], 'type' => $_data['type']);
$limit = $session_servicetype->limit;
} else {
$search = '';
}
$db = new Accounting_Model_DbTable_DbTuitionFee();
$service = $db->getAllTuitionFee($search);
$model = new Application_Model_DbTable_DbGlobal();
$row = 0;
$indexterm = 1;
$key = 0;
if (!empty($service)) {
foreach ($service as $i => $rs) {
$rows = $db->getFeebyOther($rs['id']);
$fee_row = 1;
if (!empty($rows)) {
foreach ($rows as $payment_tran) {
if ($payment_tran['payment_type'] == 1) {
$rs_rows[$key] = $this->headAddRecordTuitionFee($rs, $key);
$term = $model->getAllPaymentTerm($fee_row);
$rs_rows[$key]['quarter'] = $payment_tran['tuition_fee'];
$key_old = $key;
$key++;
} elseif ($payment_tran['payment_type'] == 2) {
$term = $model->getAllPaymentTerm($payment_tran['payment_type']);
$rs_rows[$key_old]['semester'] = $payment_tran['tuition_fee'];
} elseif ($payment_tran['payment_type'] == 3) {
$term = $model->getAllPaymentTerm($payment_tran['payment_type']);
$rs_rows[$key_old]['year'] = $payment_tran['tuition_fee'];
} else {
$term = $model->getAllPaymentTerm($payment_tran['payment_type']);
$rs_rows[$key_old]['full_fee'] = $payment_tran['tuition_fee'];
}
if ($rs['degree_type'] == 1) {
$rs_rows[$key_old]['faculty_name'] = Application_Model_DbTable_DbGlobal::getAllMention($payment_tran['metion']);
} else {
$r_facu = $model->getDeptById($payment_tran['metion']);
$rs_rows[$key_old]['faculty_name'] = $r_facu['en_name'];
}
}
}
}
} else {
$result = Application_Model_DbTable_DbGlobal::getResultWarning();
}
$pay_term = $model->getAllPaymentTerm();
$payment_term = '';
foreach ($pay_term as $value) {
$payment_term .= '"' . $value . '",';
}
$list = new Application_Form_Frmtable();
$collumns = array("DEGREE", "FACULTY/METION", "BATCH", "STATUS", "QUARTER", "SEMESTER", "YEAR", "FULL_FEE");
$link = array('module' => 'accounting', 'controller' => 'fee', 'action' => 'edit-feetuition');
$urlEdit = BASE_URL . "/product/index/update";
$this->view->list = $list->getCheckList(1, $collumns, $rs_rows, array('degree' => $link));
} catch (Exception $e) {
Application_Form_FrmMessage::message("APPLICATION_ERROR");
Application_Model_DbTable_DbUserLog::writeMessageError($e->getMessage());
}
$frm = new Global_Form_FrmSearchMajor();
$frm = $frm->frmSearchTutionFee();
Application_Model_Decorator::removeAllDecorator($frm);
$this->view->frm_search = $frm;
}