当前位置: 首页>>代码示例>>PHP>>正文


PHP ExceptionHandler::PopAllExceptions方法代码示例

本文整理汇总了PHP中ExceptionHandler::PopAllExceptions方法的典型用法代码示例。如果您正苦于以下问题:PHP ExceptionHandler::PopAllExceptions方法的具体用法?PHP ExceptionHandler::PopAllExceptions怎么用?PHP ExceptionHandler::PopAllExceptions使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ExceptionHandler的用法示例。


在下文中一共展示了ExceptionHandler::PopAllExceptions方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: SaveTemplate

function SaveTemplate()
{
    $pdo = PdoDataAccess::getPdoObject();
    $pdo->beginTransaction();
    $CorrectContent = CNT_templates::CorrectTemplateContentItems($_POST['TemplateContent']);
    $obj = new CNT_templates();
    $obj->TemplateContent = $CorrectContent;
    $obj->TemplateTitle = $_POST['TemplateTitle'];
    if ($_POST['TemplateID'] > 0) {
        $obj->TemplateID = $_POST['TemplateID'];
        $result = $obj->Edit($pdo);
    } else {
        $result = $obj->Add($pdo);
    }
    if (!$result) {
        $pdo->rollBack();
        print_r(ExceptionHandler::PopAllExceptions());
        //echo PdoDataAccess::GetLatestQueryString();
        echo Response::createObjectiveResponse(false, ExceptionHandler::GetExceptionsToString());
        die;
    }
    $pdo->commit();
    echo Response::createObjectiveResponse(true, $obj->TemplateID);
    die;
}
开发者ID:jafarkhani,项目名称:rtfund,代码行数:25,代码来源:templates.data.php

示例2: SaveContract

function SaveContract()
{
    $pdo = PdoDataAccess::getPdoObject();
    $pdo->beginTransaction();
    $CntObj = new CNT_contracts();
    PdoDataAccess::FillObjectByArray($CntObj, $_POST);
    if ($_POST["ContractID"] == "") {
        $CntObj->RegPersonID = $_SESSION['USER']["PersonID"];
        $CntObj->RegDate = PDONOW;
        $result = $CntObj->Add($pdo);
    } else {
        $result = $CntObj->Edit($pdo);
        /* removing values of contract items */
        CNT_ContractItems::RemoveAll($CntObj->ContractID, $pdo);
    }
    if (!$result) {
        $pdo->rollBack();
        print_r(ExceptionHandler::PopAllExceptions());
        //echo PdoDataAccess::GetLatestQueryString();
        echo Response::createObjectiveResponse(false, ExceptionHandler::GetExceptionsToString());
        die;
    }
    /* Adding the values of Contract items */
    foreach ($_POST as $PostData => $val) {
        if (empty($val)) {
            continue;
        }
        if (!(substr($PostData, 0, 8) == "TplItem_")) {
            continue;
        }
        $items = explode('_', $PostData);
        $TemplateItemID = $items[1];
        $CntItemsObj = new CNT_ContractItems();
        $CntItemsObj->ContractID = $CntObj->ContractID;
        $CntItemsObj->TemplateItemID = $TemplateItemID;
        $TplItemObj = new CNT_TemplateItems($CntItemsObj->TemplateItemID);
        switch ($TplItemObj->ItemType) {
            case 'shdatefield':
                $CntItemsObj->ItemValue = DateModules::shamsi_to_miladi($val);
                break;
            default:
                $CntItemsObj->ItemValue = $val;
        }
        $result = $CntItemsObj->Add($pdo);
    }
    if (!$result) {
        $pdo->rollBack();
        print_r(ExceptionHandler::PopAllExceptions());
        //echo PdoDataAccess::GetLatestQueryString();
        echo Response::createObjectiveResponse(false, ExceptionHandler::GetExceptionsToString());
        die;
    }
    $pdo->commit();
    echo Response::createObjectiveResponse(true, $CntObj->ContractID);
    die;
}
开发者ID:jafarkhani,项目名称:rtfund,代码行数:56,代码来源:contract.data.php

示例3: AddEducation

 function AddEducation()
 {
     $this->row_no = manage_person_education::LastID($this->PersonID) + 1;
     if (parent::insert("HRM_person_educations", $this) === false) {
         print_r(ExceptionHandler::PopAllExceptions());
         die;
         return false;
     }
     $daObj = new DataAudit();
     $daObj->ActionType = DataAudit::Action_add;
     $daObj->RelatedPersonType = 3;
     $daObj->RelatedPersonID = $this->PersonID;
     $daObj->MainObjectID = $this->row_no;
     $daObj->TableName = "HRM_person_educations";
     $daObj->execute();
     return true;
 }
开发者ID:jafarkhani,项目名称:rtfund,代码行数:17,代码来源:education.class.php

示例4: SelectCostCode

function SelectCostCode()
{
    $param = array();
    $where = isset($_REQUEST["All"]) ? "1=1" : "cc.IsActive='YES' ";
    if (!empty($_REQUEST['query'])) {
        if (isset($_REQUEST['fields'])) {
            if (strpos($_REQUEST['fields'], "LevelTitle") !== false) {
                $where .= " AND " . str_replace("LevelTitle", "b", $_REQUEST['fields']) . ".BlockDesc like :f1";
                $param[":f1"] = "%" . $_REQUEST['query'] . "%";
            } else {
                if ($_REQUEST["fields"] == "CostCode") {
                    $where .= " AND CostCode like :f3";
                    $param[":f3"] = $_REQUEST['query'] . "%";
                }
            }
        } else {
            $where .= " AND ( concat_ws(' ',b1.BlockDesc,b2.BlockDesc,b3.BlockDesc) like :f4";
            $where .= " OR CostCode like :f5 )";
            $param[":f4"] = "%" . $_REQUEST['query'] . "%";
            $param[":f5"] = $_REQUEST['query'] . "%";
        }
    }
    if (!empty($_REQUEST['CostID'])) {
        $where .= " and cc.CostID=:CostID ";
        $param[':CostID'] = $_REQUEST['CostID'];
    }
    $where .= dataReader::makeOrder();
    $list = ACC_CostCodes::SelectCost($where, $param);
    print_r(ExceptionHandler::PopAllExceptions());
    $count = $list->RowCount();
    $list = PdoDataAccess::fetchAll($list, $_GET["start"], $_GET["limit"]);
    /*for ($i = 0; $i < count($list); $i++) {
            $remainderRecord = CostCode::GetCostRemainder($_SESSION["ACCUSER"]['UnitID'], $_SESSION["ACCUSER"]['PeriodID'], $list[$i]['CostID']);
            $difference = $remainderRecord["amount"];
            if ($remainderRecord["essence"] == "CREDITOR")
                $difference = (-1) * $difference;
            if (empty($difference) || $difference == 0)
                $list[$i]['CostRemain'] = '0';
            else {
    
                if ($difference < 0) {
                    $list[$i]['CostRemain'] = number_format($difference * -1);
                    $list[$i]['SignRemain'] = 1;
                } else {
                    $list[$i]['CostRemain'] = number_format($difference);
                    $list[$i]['SignRemain'] = 0;
                }
            }
        }*/
    echo dataReader::getJsonData($list, $count, $_GET['callback']);
    die;
}
开发者ID:jafarkhani,项目名称:rtfund,代码行数:52,代码来源:baseinfo.data.php

示例5: run

 public function run()
 {
     $pdo = parent::getPdoObject();
     $pdo->beginTransaction();
     if ($this->payment_type == 1) {
         $this->prepare_wheres();
         $this->init();
         $this->ins_commited_staff();
         $this->ins_last_flow_not_fich();
         $this->fail_log();
         $this->remove_from_limit_staff();
         $this->remove_payment_items();
         $this->remove_payment_writs();
         $this->remove_payments();
         $this->remove_temp_subtract_flow();
         $this->update_person_dependent_support();
     } else {
         $this->remove_payment_items($this->payment_type);
         $this->remove_payments($this->payment_type);
     }
     if (parent::GetExceptionCount() > 0) {
         print_r(ExceptionHandler::PopAllExceptions());
         echo "----";
         die;
         $pdo->rollBack();
         return false;
     } else {
         $pdo->commit();
         return true;
     }
 }
开发者ID:jafarkhani,项目名称:rtfund,代码行数:31,代码来源:payment_cancel.class.php

示例6: DeletePost

function DeletePost()
{
    $query = "select * from `position` where parent_post_id=" . $_REQUEST["post_id"];
    $temp = PdoDataAccess::runquery($query);
    if (count($temp) != 0) {
        echo "ChildError";
        die;
    }
    manage_posts::RemovePost($_POST["post_id"]);
    print_r(ExceptionHandler::PopAllExceptions());
    echo "true";
    die;
}
开发者ID:jafarkhani,项目名称:rtfund,代码行数:13,代码来源:post.data.php

示例7: SelectOperations

function SelectOperations()
{
    $param = array();
    $where = "";
    if (isset($_REQUEST['fields']) && isset($_REQUEST['query'])) {
        $field = $_REQUEST['fields'];
        $where .= ' and ' . $field . ' like :fld';
        $param[':fld'] = '%' . $_REQUEST['query'] . '%';
    }
    $dt = NTC_operations::Get($where . dataReader::makeOrder(), $param);
    print_r(ExceptionHandler::PopAllExceptions());
    //echo PdoDataAccess::GetLatestQueryString();
    $count = $dt->rowCount();
    $dt = PdoDataAccess::fetchAll($dt, $_GET["start"], $_GET["limit"]);
    echo dataReader::getJsonData($dt, $count, $_GET["callback"]);
    die;
}
开发者ID:jafarkhani,项目名称:rtfund,代码行数:17,代码来源:operation.data.php

示例8: ArrearTransferAction

function ArrearTransferAction()
{
    $selected_writs = array();
    $keys = array_keys($_POST);
    for ($i = 0; $i < count($_POST); $i++) {
        if (strpos($keys[$i], "chk_") !== false) {
            $arr = preg_split('/_/', $keys[$i]);
            $selected_writs[] = array("writ_id" => $arr[1], "writ_ver" => $arr[2], "staff_id" => $arr[3], "execute_date" => $arr[4]);
        }
    }
    $new_state = $_POST["new_state"];
    $old_state = $_POST["mode"] == "return" ? $new_state + 1 : $new_state - 1;
    $return = true;
    for ($i = 0; $i < count($selected_writs); $i++) {
        if (PdoDataAccess::runquery(" update writs set arrear = " . $new_state . "\n\t\t\t\t\t\t\t\t\t\twhere writ_id = " . $selected_writs[$i]["writ_id"] . " and  writ_ver = " . $selected_writs[$i]["writ_ver"] . " and \n\t\t\t\t\t\t\t\t\t\t\t\tstaff_id = " . $selected_writs[$i]["staff_id"] . " and execute_date = '" . $selected_writs[$i]["execute_date"] . "'") === false) {
            $return = false;
        }
    }
    if ($return) {
        echo "true";
    } else {
        print_r(ExceptionHandler::PopAllExceptions());
    }
    die;
}
开发者ID:jafarkhani,项目名称:rtfund,代码行数:25,代码来源:writ.data.php

示例9: RegisterStartDoc

function RegisterStartDoc()
{
    $dt = PdoDataAccess::runquery("select * from ACC_docs where DocType=" . DOCTYPE_STARTCYCLE . "\n\t\tAND BranchID=? AND CycleID=?", array($_SESSION["accounting"]["CycleID"], $_SESSION["accounting"]["BranchID"]));
    if (count($dt) > 0) {
        echo Response::createObjectiveResponse(false, "سند افتتاحیه در این دوره قبلا صادر شده است");
        die;
    }
    $LocalNo = $_POST["LocalNo"];
    if ($LocalNo != "") {
        $dt = PdoDataAccess::runquery("select * from ACC_docs \n\t\t\twhere BranchID=? AND CycleID=? AND LocalNo=?", array($_SESSION["accounting"]["BranchID"], $_SESSION["accounting"]["CycleID"], $LocalNo));
        if (count($dt) > 0) {
            echo Response::createObjectiveResponse(false, "شماره سند وارد شده موجود می باشد");
            die;
        }
    }
    $dt = PdoDataAccess::runquery("select * from ACC_cycles where CycleID<" . $_SESSION["accounting"]["CycleID"]);
    if (count($dt) == 0) {
        Response::createObjectiveResponse(false, "دوره ایی قبل این دوره برای صدور سند افتتاحیه موجود نمی باشد");
        die;
    }
    $pdo = PdoDataAccess::getPdoObject();
    $pdo->beginTransaction();
    //---------------- account header doc --------------------
    $obj = new ACC_docs();
    $obj->LocalNo = $LocalNo;
    $obj->RegDate = PDONOW;
    $obj->regPersonID = $_SESSION['USER']["PersonID"];
    $obj->DocDate = PDONOW;
    $obj->CycleID = $_SESSION["accounting"]["CycleID"];
    $obj->BranchID = $_SESSION["accounting"]["BranchID"];
    $obj->description = "سند افتتاحیه";
    $obj->DocType = DOCTYPE_STARTCYCLE;
    $result = $obj->Add($pdo);
    if (!$result) {
        $pdo->rollBack();
        print_r(ExceptionHandler::PopAllExceptions());
        echo Response::createObjectiveResponse(false, "");
        die;
    }
    PdoDataAccess::runquery("\n\t\tinsert into ACC_DocItems(DocID,CostID,TafsiliType,TafsiliID,DebtorAmount,CreditorAmount,locked)\n\t\tselect {$obj->DocID},CostID,TafsiliType,TafsiliID,\n\t\t\tif( sum(DebtorAmount-CreditorAmount)>0, sum(DebtorAmount-CreditorAmount), 0 ),\n\t\t\tif( sum(CreditorAmount-DebtorAmount)>0, sum(CreditorAmount-DebtorAmount), 0 ),\n\t\t\t1\n\t\tfrom ACC_DocItems i\n\t\tjoin ACC_docs using(DocID)\n\t\twhere CycleID=" . $_SESSION["accounting"]["CycleID"] - 1 . "\n\t\t\tAND BranchID = " . $_SESSION["accounting"]["BranchID"] . "\n\t\tgroup by CostID,TafsiliID\t\n\t\thaving sum(CreditorAmount-DebtorAmount)<>0\n\t", array(), $pdo);
    if (ExceptionHandler::GetExceptionCount() > 0) {
        $pdo->rollBack();
        print_r(ExceptionHandler::PopAllExceptions());
        echo Response::createObjectiveResponse(false, "");
        die;
    }
    if (PdoDataAccess::AffectedRows($pdo) == 0) {
        $pdo->rollBack();
        echo Response::createObjectiveResponse(false, "ردیفی برای صدور سند افتتاحیه یافت نشد");
        die;
    }
    $pdo->commit();
    echo Response::createObjectiveResponse(true, "");
    die;
}
开发者ID:jafarkhani,项目名称:rtfund,代码行数:55,代码来源:doc.data.php

示例10: function

			},
			method: 'POST',
			form: form,

			success: function(response,option){
				mask.hide();
				//Ext.getCmp("j1").collapse();

				document.getElementById("result").innerHTML = response.responseText;
			},
			failure: function(){}
		});
	}
	</script>
<?
print_r(ExceptionHandler::PopAllExceptions());
ExceptionHandler::showExceptionPanel('result'); ?>
</head>
<body dir="rtl">
	<form method="post" id="mainForm">
		<center>
		<br>
		<div id="issuePayment_DIV" style="width: 750px">
			<table id="issuePayment_TBL" style="width: 100%">
				<tr>
					<td width="20%">واحد محل خدمت :</td>
					<td width="30%"><?php 
echo $drp_units;
?>
</td>
					<td width="20%">جستجو در زیر واحد ها :</td>
开发者ID:jafarkhani,项目名称:rtfund,代码行数:31,代码来源:process_payment.php

示例11: round

		$ACC_pt = ImportSalary::PERSON_TYPE_Contract;
		$AccDocObj->AddItem($ACC_UnitID, $CostCodesArray[$ACC_pt]["salary"], $gh_hoghoogh, $ACC_pt);
		$AccDocObj->AddItem($ACC_UnitID, $CostCodesArray[$ACC_pt]["overtime"], $gh_ezafeKar + $OverTimeGharardadi, $ACC_pt);
		$AccDocObj->AddItem($ACC_UnitID, $CostCodesArray[$ACC_pt]["OrgInsurance"], round($gh_bimeh_dastgah), $ACC_pt);
		$AccDocObj->AddItem($ACC_UnitID, $CostCodesArray[$ACC_pt]["GovInsurance"], $gh_bimeh_dolat, $ACC_pt);
		$AccDocObj->AddItem($ACC_UnitID, $CostCodesArray[$ACC_pt]["27"], ($gh_made_kharej_Az_shomool27 + $ExtraGharardadi), $ACC_pt);
		$AccDocObj->AddItem($ACC_UnitID, $CostCodesArray[$ACC_pt]["38"], ($gh_made_kharej_Az_shomool38 + $ExtraGharardadi), $ACC_pt);
		$AccDocObj->AddItem($ACC_UnitID, $CostCodesArray[$ACC_pt]["extra"], $gh_jazb_omana, $ACC_pt);

		if(ExceptionHandler::GetExceptionCount() > 0)
		{
			echo "مرکز هزینه : " . $title . "<br><hr><br>";
			echo "<span style=color:red><h3>" . ExceptionHandler::GetExceptionsToString ("<br>") . "</h3></span>";
			$AccError = true;
		}
		ExceptionHandler::PopAllExceptions();
	}
	//</editor-fold>

	echo '<tr>
			<td>علمی مشروط</td>
			<td>' . $mp_hoghoogh . '</td>
			<td>' . ($mp_ezafeKar + $OverTimeMProf) . '</td>
			<td>' . round($mp_bimeh_dastgah) . '</td>
			<td>' . $mp_bimeh_dolat . '</td>
			<td>' . ($mp_made_kharej_Az_shomool + $ExtraMProf) . '</td>
			<td>' . $mp_jazb_omana . '</td>
			<td>' . ($mp_sum + $ExtraMProf + $OverTimeMProf) . '</td>			
		  </tr>
		  <tr>
			 <td>هیات علمی</td>
开发者ID:jafarkhani,项目名称:rtfund,代码行数:31,代码来源:plan_report.php

示例12: delete

function delete()
{
    $ret = manage_professor_exe_posts::Remove($_POST["staff_id"], $_POST["row_no"]);
    echo Response::createObjectiveResponse($ret, implode(ExceptionHandler::PopAllExceptions()));
    die;
}
开发者ID:jafarkhani,项目名称:rtfund,代码行数:6,代码来源:exe_posts.data.php

示例13: saveMessage

function saveMessage()
{
    $obj = new LON_messages();
    if (isset($_POST["record"])) {
        PdoDataAccess::FillObjectByJsonData($obj, $_POST["record"]);
    } else {
        PdoDataAccess::FillObjectByArray($obj, $_POST);
        $obj->MsgStatus = "DONE";
    }
    if (isset($_POST["DoneDesc"])) {
        $obj->DoneDate = PDONOW;
    }
    if ($obj->MessageID != "") {
        $result = $obj->Edit();
    } else {
        $obj->RegPersonID = $_SESSION["USER"]["PersonID"];
        $obj->CreateDate = PDONOW;
        $result = $obj->Add();
    }
    print_r(ExceptionHandler::PopAllExceptions());
    Response::createObjectiveResponse($result, "");
    die;
}
开发者ID:jafarkhani,项目名称:rtfund,代码行数:23,代码来源:request.data.php

示例14: saveDepSupport

function saveDepSupport()
{
    $obj = new manage_dependent_support();
    PdoDataAccess::FillObjectByJsonData($obj, $_POST["record"]);
    if ($obj->row_no == "") {
        $return = $obj->Add();
    } else {
        $return = $obj->Edit();
    }
    echo $return ? "true" : "false";
    print_r(ExceptionHandler::PopAllExceptions());
    die;
}
开发者ID:jafarkhani,项目名称:rtfund,代码行数:13,代码来源:dependent.data.php

示例15: RegisterWarrantyDoc


//.........这里部分代码省略.........
    }
    //------------------- compute wage -----------------------
    $curYear = substr(DateModules::miladi_to_shamsi($ReqObj->StartDate), 0, 4) * 1;
    foreach ($years as $Year => $amount) {
        if ($amount == 0) {
            continue;
        }
        $YearTafsili = FindTafsiliID($Year, TAFTYPE_YEARS);
        if (!$YearTafsili) {
            ExceptionHandler::PushException("تفصیلی مربوطه یافت نشد.[" . $Year . "]");
            return false;
        }
        unset($itemObj->ItemID);
        $itemObj->details = "کارمزد ضمانت نامه شماره " . $ReqObj->RequestID;
        $itemObj->CostID = $Year == $curYear ? $CostCode_wage : $CostCode_FutureWage;
        $itemObj->DebtorAmount = 0;
        $itemObj->CreditorAmount = $amount;
        $itemObj->TafsiliType = TAFTYPE_YEARS;
        $itemObj->TafsiliID = $YearTafsili;
        $itemObj->Add($pdo);
    }
    //---------------------------- block Cost ----------------------------
    if ($ReqObj->IsBlock == "YES") {
        $blockObj = new ACC_CostBlocks();
        $blockObj->CostID = !empty($Block_CostID) ? $Block_CostID : $CostCode_pasandaz;
        $blockObj->TafsiliType = TAFTYPE_PERSONS;
        $blockObj->TafsiliID = $PersonTafsili;
        $blockObj->BlockAmount = $ReqObj->amount;
        $blockObj->IsLock = "YES";
        $blockObj->SourceType = DOCTYPE_WARRENTY;
        $blockObj->SourceID = $ReqObj->RequestID;
        $blockObj->details = "بابت ضمانت نامه شماره " . $ReqObj->RequestID;
        if (!$blockObj->Add()) {
            print_r(ExceptionHandler::PopAllExceptions());
            ExceptionHandler::PushException("خطا در بلوکه کردن حساب پس انداز");
            return false;
        }
    }
    // ---------------------- Warrenty costs -----------------------------
    $totalCostAmount = 0;
    $dt = PdoDataAccess::runquery("select * from WAR_costs where RequestID=?", array($ReqObj->RequestID));
    foreach ($dt as $row) {
        $totalCostAmount += ($row["CostType"] == "DEBTOR" ? 1 : -1) * $row["CostAmount"] * 1;
        unset($itemObj->ItemID);
        $itemObj->SourceID2 = $row["CostID"];
        $itemObj->details = $row["CostDesc"];
        $itemObj->CostID = $row["CostCodeID"];
        $itemObj->DebtorAmount = $row["CostType"] == "DEBTOR" ? $row["CostAmount"] : 0;
        $itemObj->CreditorAmount = $row["CostType"] == "CREDITOR" ? $row["CostAmount"] : 0;
        $itemObj->Add($pdo);
    }
    // ----------------------------- bank --------------------------------
    unset($itemObj->ItemID);
    unset($itemObj->TafsiliType);
    unset($itemObj->TafsiliID);
    $itemObj->details = "بابت 10% سپرده ضمانت نامه شماره " . $ReqObj->RequestID;
    $itemObj->CostID = $CostCode_seporde;
    $itemObj->DebtorAmount = 0;
    $itemObj->CreditorAmount = $ReqObj->amount * 0.1;
    $itemObj->Add($pdo);
    unset($itemObj->ItemID);
    $itemObj->details = "بابت کارمزد ضمانت نامه شماره " . $ReqObj->RequestID;
    $itemObj->CostID = FindCostID($WageCost);
    $itemObj->DebtorAmount = $TotalWage + $ReqObj->amount * 0.1 - $totalCostAmount;
    $itemObj->CreditorAmount = 0;
    if ($WageCost == "101") {
开发者ID:jafarkhani,项目名称:rtfund,代码行数:67,代码来源:import.data.php


注:本文中的ExceptionHandler::PopAllExceptions方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。