本文整理汇总了PHP中Response::createObjectiveResponse方法的典型用法代码示例。如果您正苦于以下问题:PHP Response::createObjectiveResponse方法的具体用法?PHP Response::createObjectiveResponse怎么用?PHP Response::createObjectiveResponse使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Response
的用法示例。
在下文中一共展示了Response::createObjectiveResponse方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: ResetPass
function ResetPass()
{
$result = BSC_persons::ResetPass($_POST["PersonID"]);
echo Response::createObjectiveResponse($result, "");
die;
}
示例2: saveStaffData
function saveStaffData()
{
$obj = new manage_staff();
PdoDataAccess::FillObjectByArray($obj, $_POST);
if (isset($_POST["work_start_date"])) {
$obj->work_start_date = DateModules::Shamsi_to_Miladi($_POST["work_start_date"]);
}
if (isset($_POST["ProfWorkStart"])) {
$obj->ProfWorkStart = DateModules::Shamsi_to_Miladi($_POST["ProfWorkStart"]);
}
if (isset($_POST["retired_date"])) {
$obj->retired_date = DateModules::Shamsi_to_Miladi($_POST["retired_date"]);
}
if (isset($_POST["last_retired_pay"])) {
$obj->last_retired_pay = DateModules::Shamsi_to_Miladi($_POST["last_retired_pay"]);
}
if (!isset($_POST['Over25'])) {
$obj->Over25 = 0;
}
$obj->sum_paied_pension = $obj->sum_paied_pension > 0 ? $obj->sum_paied_pension : "0";
$return = $obj->EditStaff();
$key = $obj->staff_id . "," . $obj->PersonID . "," . $obj->person_type;
echo $return ? Response::createObjectiveResponse("true", $key) : Response::createObjectiveResponse(false, ExceptionHandler::GetExceptionsToString("\n"));
die;
}
示例3: DontPayItem
function DontPayItem()
{
$obj = new manage_writ_item();
$return = $obj->DontPayItems($_POST["writ_id"], $_POST["writ_ver"], $_POST["staff_id"]);
echo Response::createObjectiveResponse($return, $return ? $obj->writ_id : ExceptionHandler::popExceptionDescription());
die;
}
示例4: DeleteElement
function DeleteElement()
{
$obj = new PLN_Elements();
$obj->ElementID = $_POST["ElementID"];
$result = $obj->Remove();
echo Response::createObjectiveResponse($result, "");
die;
}
示例5: SavePersonalInfo
function SavePersonalInfo()
{
$obj = new BSC_persons();
$obj->PersonID = $_SESSION["USER"]["PersonID"];
PdoDataAccess::FillObjectByArray($obj, $_POST);
$result = $obj->EditPerson();
echo Response::createObjectiveResponse($result, "");
die;
}
示例6: DeleteMiscDoc
function DeleteMiscDoc()
{
$return = manage_person_misc_doc::RemoveMiscDoc($_POST['PersonID'], $_POST['row_no']);
if ($return !== true) {
echo $return;
die;
}
echo Response::createObjectiveResponse("true", $_POST['PersonID']);
die;
}
示例7: deleteJH
function deleteJH()
{
$return = manage_person_job::RemoveJobHistory($_POST['PID'], $_POST['RowNO']);
if ($return !== true) {
echo $return;
die;
}
echo Response::createObjectiveResponse("true", $_POST['PID']);
die;
}
示例8: removeCC
function removeCC()
{
$result = manage_cost_centers::Remove($_POST["cid"]);
if (!$result) {
Response::createObjectiveResponse(false, ExceptionHandler::GetExceptionsToString());
die;
} else {
Response::createObjectiveResponse(true, "");
die;
}
}
示例9: saveTaxHisGrid
function saveTaxHisGrid()
{
$obj = new manage_staff_tax();
PdoDataAccess::FillObjectByJsonData($obj, $_POST["record"]);
if ($obj->tax_history_id == "") {
$return = $obj->SaveStaffTaxHistory($_POST['PersonID']);
} else {
$return = $obj->EditStaffTaxHistory($_POST['PersonID']);
}
echo $return ? Response::createObjectiveResponse(true, $obj->staff_id) : Response::createObjectiveResponse(false, ExceptionHandler::GetExceptionsToString("\n"));
die;
}
示例10: CreateNewStaff
function CreateNewStaff()
{
$PID = $_POST['personid'];
$PT = $_POST['person_type'];
$STID = $_POST['staff_id'];
$res = manage_staff::Create_New_Staff($PID, $PT);
if (!empty($res)) {
Response::createObjectiveResponse(true, "{STID:" . $res . " ,PID:" . $PID . "}");
die;
} else {
Response::createObjectiveResponse(false, ExceptionHandler::ConvertExceptionsToJsObject());
die;
}
}
示例11: SaveUnit
function SaveUnit()
{
$obj = new manage_units();
PdoDataAccess::FillObjectByArray($obj, $_POST);
if (empty($_POST["ouid"])) {
$obj->RegDate = date('Y-m-d');
$obj->parent_path = $_POST["parent_path"] == "" ? $obj->parent_path : $_POST["parent_path"] . "," . $obj->parent_ouid;
$obj->AddUnit();
} else {
$obj->ouid = $_POST["ouid"];
$obj->EditUnit();
}
echo Response::createObjectiveResponse("true", $obj->ouid);
die;
}
示例12: DepositeProfit
function DepositeProfit()
{
$Tafsilis = array();
$keys = array_keys($_POST);
foreach ($keys as $key) {
if (strpos($key, "chk_") !== false) {
$Tafsilis[] = substr($key, 4) * 1;
}
}
if (count($Tafsilis) == 0) {
echo Response::createObjectiveResponse(false, "هیچ ردیفی انتخاب نشده است");
die;
}
$ToDate = DateModules::shamsi_to_miladi($_POST["ToDate"]);
ComputeDepositeProfit($ToDate, $Tafsilis);
die;
}
示例13: WritSubTypeSave
function WritSubTypeSave()
{
$obj = new manage_writ_subType($_POST['person_type'], $_POST['writ_type_id']);
PdoDataAccess::FillObjectByArray($obj, $_POST);
$obj->time_limited = isset($_POST['time_limited']) ? $_POST['time_limited'] : 0;
$obj->req_staff_signature = isset($_POST['req_staff_signature']) ? $_POST['req_staff_signature'] : 0;
$obj->automatic = isset($_POST['automatic']) ? $_POST['automatic'] : 0;
$obj->edit_fields = isset($_POST['edit_fields']) ? $_POST['edit_fields'] : 0;
$obj->force_writ_issue = isset($_POST['force_writ_issue']) ? $_POST['force_writ_issue'] : 0;
$obj->show_in_summary_doc = isset($_POST['show_in_summary_doc']) ? $_POST['show_in_summary_doc'] : 0;
if (empty($_POST["writ_subtype_id"])) {
$result = $obj->AddWST();
} else {
$obj->writ_subtype_id = $_POST["writ_subtype_id"];
$result = $obj->EditWST();
}
echo Response::createObjectiveResponse($result == true ? "true" : "false", $obj->person_type . "-" . $obj->writ_type_id . "-" . $obj->writ_subtype_id);
die;
}
示例14: removeTask
function removeTask()
{
$result = FRW_tasks::DeleteTask($_POST["TaskID"]);
Response::createObjectiveResponse($result, "");
die;
}
示例15: RegisterInOutAccountDoc
function RegisterInOutAccountDoc()
{
$CostID = $_REQUEST["BaseCostID"];
$BaseTafsiliID = $_REQUEST["BaseTafsiliID"];
$mode = $_POST["mode"] * 1;
if ($mode < 0) {
$query = "select ifnull(sum(CreditorAmount-DebtorAmount),0) remaindar\n\t\tfrom ACC_DocItems di\n\t\t\tjoin ACC_docs d using(DocID)\n\t\twhere d.CycleID=:c AND d.BranchID=:b AND \n\t\t\tdi.CostID=:cost AND di.TafsiliType = :t AND di.TafsiliID=:tid";
$param = array(":c" => $_SESSION["accounting"]["CycleID"], ":b" => $_SESSION["accounting"]["BranchID"], ":cost" => $CostID, ":t" => TAFTYPE_PERSONS, ":tid" => $BaseTafsiliID);
$dt = PdoDataAccess::runquery($query, $param);
//echo PdoDataAccess::GetLatestQueryString();
if ($_POST["amount"] > $dt[0][0] * 1) {
echo Response::createObjectiveResponse(false, "مبلغ وارد شده بیشتر از مانده حساب می باشد");
die;
}
}
$pdo = PdoDataAccess::getPdoObject();
$pdo->beginTransaction();
//---------------- add doc header --------------------
$obj = new ACC_docs();
$obj->RegDate = PDONOW;
$obj->regPersonID = $_SESSION['USER']["PersonID"];
$obj->DocDate = PDONOW;
$obj->CycleID = $_SESSION["accounting"]["CycleID"];
$obj->BranchID = $_SESSION["accounting"]["BranchID"];
$obj->DocType = $mode > 0 ? DOCTYPE_SAVING_IN : DOCTYPE_SAVING_OUT;
$obj->description = $mode > 0 ? "واریز به حساب" : "برداشت از حساب";
if (!$obj->Add($pdo)) {
echo Response::createObjectiveResponse(false, "خطا در ایجاد سند");
die;
}
//-------------------------------------------------
$itemObj = new ACC_DocItems();
$itemObj->DocID = $obj->DocID;
$itemObj->CostID = $CostID;
$itemObj->DebtorAmount = $mode > 0 ? 0 : $_POST["amount"];
$itemObj->CreditorAmount = $mode > 0 ? $_POST["amount"] : 0;
$itemObj->TafsiliType = TAFTYPE_PERSONS;
$itemObj->TafsiliID = $BaseTafsiliID;
$itemObj->details = $_POST["description"];
if (!$itemObj->Add($pdo)) {
echo Response::createObjectiveResponse(false, ExceptionHandler::GetExceptionsToString());
die;
}
$itemObj = new ACC_DocItems();
$itemObj->DocID = $obj->DocID;
$itemObj->CostID = $_POST["CostID"];
$itemObj->DebtorAmount = $mode > 0 ? $_POST["amount"] : 0;
$itemObj->CreditorAmount = $mode > 0 ? 0 : $_POST["amount"];
if ($itemObj->CostID == COSTID_Bank) {
$itemObj->TafsiliType = TAFTYPE_BANKS;
$itemObj->TafsiliID = $_POST["TafsiliID"];
$itemObj->TafsiliType2 = TAFTYPE_ACCOUNTS;
$itemObj->TafsiliID2 = $_POST["TafsiliID2"];
}
if (!$itemObj->Add($pdo)) {
echo Response::createObjectiveResponse(false, ExceptionHandler::GetExceptionsToString());
die;
}
$pdo->commit();
echo Response::createObjectiveResponse(true, "");
die;
}