本文整理汇总了PHP中PdoDataAccess::FillObjectByJsonData方法的典型用法代码示例。如果您正苦于以下问题:PHP PdoDataAccess::FillObjectByJsonData方法的具体用法?PHP PdoDataAccess::FillObjectByJsonData怎么用?PHP PdoDataAccess::FillObjectByJsonData使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PdoDataAccess
的用法示例。
在下文中一共展示了PdoDataAccess::FillObjectByJsonData方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: SaveBase
function SaveBase()
{
$obj = new manage_bases();
PdoDataAccess::FillObjectByJsonData($obj, $_POST["record"]);
// بررسی گروه های تشویقی که بیشتر از 5 برای یک نفر نباشد
/*if(in_array($obj->BaseType, array(27,23,24,21,3,4,5)))
{
$query = "select sum(BaseValue) from bases
where PersonID=? AND
BaseType in(27,23,24,21,3,4,5) AND
BaseStatus = 'NORMAL'
";
$st = PdoDataAccess::runquery($query, array($obj->PersonID));
if(count($st) > 0 && (int)$st[0][0] + (int)$obj->BaseValue > 5)
{
echo Response::createObjectiveResponse(false, "OverMaxCGroup");
die();
}
}*/
//----------------------------
if (empty($obj->RowID)) {
$obj->RegDate = PDONOW;
$return = $obj->Add();
} else {
unset($obj->RegDate);
$return = $obj->Edit();
}
if (!$return) {
echo Response::createObjectiveResponse($return, ExceptionHandler::GetExceptionsToString());
die;
}
echo Response::createObjectiveResponse(true, "");
die;
}
示例2: removeTaxHistory
function removeTaxHistory()
{
$obj = new manage_staff_tax();
PdoDataAccess::FillObjectByJsonData($obj, $_POST["record"]);
echo $obj->Remove() ? "true" : "false";
die;
}
示例3: SaveJob
function SaveJob()
{
$obj = new manage_person_job();
PdoDataAccess::FillObjectByJsonData($obj, $_POST["record"]);
$obj->FromDate = DateModules::Shamsi_to_Miladi($obj->FromDate);
$obj->ToDate = DateModules::Shamsi_to_Miladi($obj->ToDate);
if (empty($obj->RowNO)) {
$return = $obj->AddJobHistory();
} else {
$return = $obj->EditJobHistory();
}
echo $return ? Response::createObjectiveResponse(true, $obj->RowNO) : Response::createObjectiveResponse(false, ExceptionHandler::GetExceptionsToString("\n"));
die;
}
示例4: SaveStep
function SaveStep()
{
$obj = new WFM_FlowSteps();
PdoDataAccess::FillObjectByJsonData($obj, $_POST["record"]);
if ($obj->StepRowID > 0) {
$result = $obj->EditFlowStep();
} else {
$dt = PdoDataAccess::runquery("select ifnull(max(StepID),0) from WFM_FlowSteps where FlowID=? AND IsActive='YES' AND IsOuter='NO'", array($obj->FlowID));
$obj->StepID = $dt[0][0] * 1 + 1;
$result = $obj->AddFlowStep();
}
echo Response::createObjectiveResponse($result, "");
die;
}
示例5: 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;
}
示例6: 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;
}
示例7: saveTax
function saveTax()
{
$obj = new manage_tax_table_types();
PdoDataAccess::FillObjectByJsonData($obj, $_POST["record"]);
if ($obj->tax_table_type_id == "") {
$return = $obj->AddTax();
} else {
$return = $obj->EditTax($obj->tax_table_type_id);
}
if ($return) {
echo Response::createResponse(true, $obj->tax_table_type_id);
} else {
echo Response::createResponse(false, '');
}
die;
}
示例8: SaveBranch
function SaveBranch()
{
$obj = new manage_study_branch();
PdoDataAccess::FillObjectByJsonData($obj, $_POST["record"]);
if (empty($obj->sbid)) {
$return = $obj->Add();
} else {
$return = $obj->Edit();
}
if (!$return) {
echo Response::createObjectiveResponse($return, ExceptionHandler::GetExceptionsToString());
die;
}
echo Response::createObjectiveResponse(true, "");
die;
}
示例9: 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;
}
示例10: saveTaxItem
function saveTaxItem()
{
$obj = new manage_Tax_Table_Item();
PdoDataAccess::FillObjectByJsonData($obj, $_POST["record"]);
$obj->tax_table_id = $_POST["tax_table_id"];
if ($obj->row_no == "") {
$return = $obj->AddTaxItem($obj->tax_table_id);
} else {
$return = $obj->EditTaxItem($obj->tax_table_id, $obj->row_no);
}
if ($return) {
echo Response::createResponse(true, $obj->tax_table_id, $obj->row_no);
} else {
echo Response::createResponse(false, ExceptionHandler::GetExceptionsToString());
}
die;
}
示例11: saveParam
function saveParam()
{
$obj = new manage_salary_param_types();
PdoDataAccess::FillObjectByJsonData($obj, $_POST["record"]);
$obj->person_type = 3;
if ($obj->param_type == "") {
$return = $obj->AddParam();
} else {
$return = $obj->EditParam($obj->param_type);
}
if ($return) {
echo Response::createResponse(true, $obj->param_type);
} else {
echo Response::createResponse(false, '');
}
die;
}
示例12: saveTax
function saveTax()
{
$obj = new manage_Tax_Table();
PdoDataAccess::FillObjectByJsonData($obj, $_POST["record"]);
$obj->tax_table_type_id = $_POST["tax_table_type_id"];
if ($obj->tax_table_id == "") {
$return = $obj->AddTax();
} else {
$return = $obj->EditTax($obj->tax_table_id);
}
if ($return) {
echo Response::createResponse(true, $obj->tax_table_id);
} else {
echo Response::createResponse(false, ExceptionHandler::ConvertExceptionsToJsObject());
}
die;
}
示例13: 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;
}
示例14: 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;
}
示例15: SaveMenu
function SaveMenu()
{
if (isset($_POST["record"])) {
$obj = new FRW_Menus();
PdoDataAccess::FillObjectByJsonData($obj, $_POST["record"]);
$st = stripslashes(stripslashes($_POST["record"]));
$data = json_decode($st);
$obj->ParentID = $data->GroupID;
$res = $obj->EditMenu();
} else {
$obj = new FRW_Menus();
PdoDataAccess::FillObjectByArray($obj, $_POST);
if (isset($_POST["MenuID"]) && $_POST["MenuID"] > 0) {
$res = $obj->EditMenu();
} else {
$res = $obj->AddMenu();
}
}
//print_r(ExceptionHandler::PopAllExceptions());
echo Response::createObjectiveResponse($res, "");
die;
}