本文整理汇总了PHP中Response::createResponse方法的典型用法代码示例。如果您正苦于以下问题:PHP Response::createResponse方法的具体用法?PHP Response::createResponse怎么用?PHP Response::createResponse使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Response
的用法示例。
在下文中一共展示了Response::createResponse方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: deleteTax
function deleteTax()
{
$obj = new manage_Tax_Table($_POST["tax_table_id"]);
$return = $obj->RemoveTax();
if ($return) {
echo Response::createResponse(true, $obj->tax_table_id);
} else {
echo Response::createResponse(false, ExceptionHandler::ConvertExceptionsToJsObject());
}
die;
}
示例2: deleteTax
function deleteTax()
{
$obj = new manage_tax_table_types();
$obj->tax_table_type_id = $_POST["tax_table_type_id"];
$obj->person_type = $_POST["person_type"];
$return = $obj->RemoveTax($obj->tax_table_type_id, $obj->person_type);
if ($return) {
echo Response::createResponse(true, $obj->tax_table_type_id);
} else {
echo Response::createResponse(false, ExceptionHandler::ConvertExceptionsToJsObject());
}
die;
}
示例3: deleteParam
function deleteParam()
{
$obj = new manage_salary_param_types();
$obj->param_type = $_POST["param_type"];
$obj->person_type = $_POST["person_type"];
$return = $obj->RemoveParam($obj->param_type, $obj->person_type);
if ($return) {
echo Response::createResponse(true, $obj->param_type);
} else {
echo Response::createResponse(false, '');
}
die;
}
示例4: SaveBank
function SaveBank()
{
$obj = new manage_bank();
PdoDataAccess::FillObjectByJsonData($obj, $_POST["record"]);
if ($obj->bank_id) {
$return = $obj->Edit();
} else {
$return = $obj->Add();
}
if ($return) {
echo Response::createResponse(true, $obj->bank_id);
} else {
echo Response::createResponse(false, ExceptionHandler::ConvertExceptionsToJsObject());
}
die;
}
示例5: SaveSIR
function SaveSIR()
{
$obj = new manage_salary_item_report();
PdoDataAccess::FillObjectByJsonData($obj, $_POST["record"]);
if ($obj->SalaryItemReportID == "") {
$return = $obj->Add();
} else {
$return = $obj->Edit();
}
if ($return) {
echo Response::createResponse(true, $obj->SalaryItemReportID);
} else {
echo Response::createResponse(false, ExceptionHandler::ConvertExceptionsToJsObject());
}
die;
}
示例6: SaveSubInfo
function SaveSubInfo()
{
$obj = new manage_subInfo();
PdoDataAccess::FillObjectByJsonData($obj, $_POST["record"]);
if ($_GET['newMode'] == 1) {
$return = $obj->Add();
} else {
$return = $obj->Edit();
}
if ($return) {
echo Response::createResponse(true, $obj->SalaryItemTypeID);
} else {
echo Response::createResponse(false, ExceptionHandler::ConvertExceptionsToJsObject());
}
die;
}
示例7: SavePriority
function SavePriority()
{
$obj = new manage_priority();
PdoDataAccess::FillObjectByJsonData($obj, $_POST["record"]);
$where = " where PriorityID=" . $obj->PriorityID;
$res = manage_priority::GetAll($where);
if (count($res) > 0) {
$return = $obj->Edit();
} else {
$return = $obj->Add();
}
if ($return) {
echo Response::createResponse(true, $obj->PriorityID);
} else {
echo Response::createResponse(false, ExceptionHandler::ConvertExceptionsToJsObject());
}
die;
}
示例8: saveParam
function saveParam()
{
$obj = new manage_salary_params();
PdoDataAccess::FillObjectByJsonData($obj, $_POST["record"]);
$obj->param_type = $_POST["param_type"];
$obj->person_type = 3;
if ($obj->param_id == "") {
$return = $obj->AddParam();
} else {
$return = $obj->EditParam($obj->param_id);
}
if ($return) {
echo Response::createResponse(true, $obj->param_type);
} else {
echo Response::createResponse(false, ExceptionHandler::GetExceptionsToString());
}
die;
}
示例9: Next_Corrective_Writ
function Next_Corrective_Writ()
{
$obj = new manage_writ($_POST['writ_id'], $_POST['writ_ver'], $_POST['staff_id']);
PdoDataAccess::FillObjectByArray($obj, $_POST);
$ret = $obj->Next_Corrective_Writ();
if (!empty($ret->writ_id)) {
echo Response::createObjectiveResponse(true, "{WID: " . $ret->writ_id . " , WVER: " . $ret->writ_ver . " , STF:" . $ret->staff_id . " }");
} else {
echo Response::createResponse(false, "Stop");
}
}
示例10: removeIncHistory
function removeIncHistory()
{
$obj = new manage_staff_include_history();
PdoDataAccess::FillObjectByJsonData($obj, $_POST["record"]);
$return = $obj->Remove();
if ($return) {
echo Response::createResponse(true, $obj->include_history_id);
} else {
echo Response::createResponse(false, ExceptionHandler::GetExceptionsToString());
}
die;
}
示例11: SaveMember
function SaveMember()
{
$obj = new manage_evaluation_list_items();
PdoDataAccess::FillObjectByJsonData($obj, $_POST["record"]);
$obj->list_id = $_POST['list_id'];
if ($obj->ListItemID == "") {
$return = $obj->Add();
} else {
$return = $obj->Edit();
}
if ($return) {
echo Response::createResponse(true, $obj->list_id);
} else {
echo Response::createResponse(false, '');
}
die;
}
示例12: SaveCheque
function SaveCheque()
{
$ChequeBook = new ACC_ChequeBooks();
PdoDataAccess::FillObjectByJsonData($ChequeBook, $_POST['record']);
if ($ChequeBook->MinNo >= $ChequeBook->MaxNo) {
Response::createResponse(false, 'بازه تعریف شده برای شماره دسته چک نامعتبر است!');
die;
}
if ($ChequeBook->ChequeBookID == '') {
$res = $ChequeBook->InsertCheque();
$dt = PdoDataAccess::runquery("select * from ACC_ChequeBooks \n\t\t\t\twhere AccountID=? AND ChequeBookID<>? order by ChequeBookID desc", array($ChequeBook->AccountID, $ChequeBook->ChequeBookID));
if (count($dt) > 0) {
$sourceFilename = "/attachment/accounting/cheques/" . $dt[0]["ChequeBookID"] . ".html";
$filename = "/attachment/accounting/cheques/" . $ChequeBook->ChequeBookID . ".html";
if (file_exists($sourceFilename)) {
$fp = fopen($filename, "w");
fwrite($fp, file_get_contents($sourceFilename));
fclose($fp);
$sourceFilename = "/attachment/accounting/cheques/" . $dt[0]["ChequeBookID"] . ".jpg";
$filename = "/attachment/accounting/cheques/" . $ChequeBook->ChequeBookID . ".jpg";
$fp = fopen($filename, "w");
fwrite($fp, file_get_contents($sourceFilename));
fclose($fp);
}
}
} else {
$res = $ChequeBook->UpdateCheque();
}
Response::createResponse($res, '');
die;
}
示例13: confirmation
function confirmation()
{
$keys = array_keys($_POST);
$WhereCost = "";
$arr = "";
//...................... مراکز هزینه ................
for ($i = 0; $i < count($_POST); $i++) {
if (strpos($keys[$i], "chkcostID_") !== false) {
$arr = preg_split('/_/', $keys[$i]);
if (isset($arr[1])) {
$WhereCost .= $WhereCost != "" ? "," . $arr[1] : $arr[1];
}
}
}
if ($_POST["ItemType"] == "salary") {
$obj = new manage_payments();
PdoDataAccess::FillObjectByArray($obj, $_POST);
$obj->_CostCenter = $WhereCost;
$return = $obj->change_payment_state($_POST["PersonType"]);
} else {
if ($_POST["ItemType"] == "reportSub") {
$obj = new manage_salary_item_report();
$obj->PayYear = $_POST["pay_year"];
$obj->PayMonth = $_POST["pay_month"];
$obj->PersonType = $_POST["PersonType"];
$obj->state = $_POST["state"];
$return = $obj->change_state();
}
}
if ($return) {
echo Response::createResponse(true, $obj->state);
} else {
echo Response::createResponse(false, ExceptionHandler::ConvertExceptionsToJsObject());
}
die;
}
示例14: SaveMember
function SaveMember()
{
$obj = new manage_pay_get_list_items();
PdoDataAccess::FillObjectByJsonData($obj, $_POST["record"]);
$obj->list_id = $_POST['list_id'];
//---
$qry = " select person_type from staff where staff_id =" . $obj->staff_id;
$res = PdoDataAccess::runquery($qry);
if ($_POST['list_type'] == EXTRA_WORK_LIST) {
if ($res[0]['person_type'] == HR_EMPLOYEE) {
$obj->salary_item_type_id = 39;
} else {
if ($res[0]['person_type'] == HR_WORKER) {
$obj->salary_item_type_id = 152;
} else {
if ($res[0]['person_type'] == HR_CONTRACT) {
$obj->salary_item_type_id = 639;
}
}
}
}
//-------
if ($obj->list_row_no == "") {
$return = $obj->Add();
} else {
$return = $obj->Edit();
}
if ($return) {
echo Response::createResponse(true, $obj->list_id);
} else {
echo Response::createResponse(false, '');
}
die;
}