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


PHP PdoDataAccess::PushException方法代码示例

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


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

示例1: Remove

 function Remove($All = "")
 {
     $query = " select * from evaluation_lists where list_id = " . $this->list_id . " and doc_state = 3 ";
     $tmp2 = parent::runquery($query);
     if (count($tmp2) > 0) {
         parent::PushException("این لیست تایید واحد مرکزی می باشد .");
         return false;
     } else {
         if ($All == "true") {
             $result = parent::delete("evaluation_list_items", "list_id=?", array($this->list_id));
         } else {
             $result = parent::delete("evaluation_list_items", "list_id =? and ListItemID=? ", array($this->list_id, $this->ListItemID));
         }
     }
     if (!$result) {
         return false;
     }
     $daObj = new DataAudit();
     $daObj->ActionType = DataAudit::Action_delete;
     $daObj->MainObjectID = $this->list_id;
     $daObj->SubObjectID = $this->ListItemID;
     $daObj->TableName = "evaluation_list_items";
     $daObj->execute();
     return true;
 }
开发者ID:jafarkhani,项目名称:rtfund,代码行数:25,代码来源:evaluation_list_items.class.php

示例2: Remove

 function Remove()
 {
     if ($this->list_type == 9) {
         $tblName = "mission_list_items";
     } else {
         $tblName = "pay_get_list_items";
     }
     $query = " select * from " . $tblName . " where list_id = " . $this->list_id;
     $tmp = parent::runquery($query);
     $query = " select * from pay_get_lists where list_id = " . $this->list_id . " and doc_state = 3 ";
     $tmp2 = parent::runquery($query);
     if (count($tmp) > 0) {
         parent::PushException("این لیست شامل مجموعه ای از افراد می باشد .");
         return false;
     } else {
         if (count($tmp2) > 0) {
             parent::PushException("این لیست تایید واحد مرکزی می باشد .");
             return false;
         } else {
             $result = parent::delete("pay_get_lists", "list_id=?", array($this->list_id));
         }
     }
     if (!$result) {
         return false;
     }
     $daObj = new DataAudit();
     $daObj->ActionType = DataAudit::Action_delete;
     $daObj->MainObjectID = $this->list_id;
     $daObj->TableName = "pay_get_lists";
     $daObj->execute();
     return true;
 }
开发者ID:jafarkhani,项目名称:rtfund,代码行数:32,代码来源:pay_get_lists.class.php

示例3: onBeforeDelete

 private function onBeforeDelete()
 {
     $res = parent::runquery(" select * from tax_table_items\r\n\t\t\t\t\t\t\t\t\t\t\t\t\twhere tax_table_id = " . $this->tax_table_id);
     if (count($res) > 0) {
         parent::PushException("این رکورد دارای اطلاعات وابسته می باشد.");
         return false;
     }
     return true;
 }
开发者ID:jafarkhani,项目名称:rtfund,代码行数:9,代码来源:tax_table_items.class.php

示例4: duty_year_month_day

function duty_year_month_day($staff_id = "", $personID = "", $toDate) {
    if ($staff_id == "" && $personID = "") {
        PdoDataAccess::PushException("يکي از دو پارامتر staff_id و PersonID بايد فرستاده شود");
        return false;                
    }
    $query = "select w.execute_date,
						w.contract_start_date ,
						w.contract_end_date ,
						w.person_type ,
						w.onduty_year ,
						w.onduty_month ,
						w.onduty_day ,
						w.annual_effect
			from writs as w";

    if ($personID != "")
        $query .= " join staff as s using(staff_id) where s.PersonID=" . $personID;

    else if ($staff_id != "")
        $query .= " where w.staff_id = $staff_id";

    $query .= " AND (w.history_only != " . HISTORY_ONLY . " OR w.history_only is null) AND w.execute_date <= '$toDate'
						order by w.execute_date DESC,w.writ_id DESC,w.writ_ver DESC
						limit 1";

    $temp = PdoDataAccess::runquery($query);

    if (count($temp) == 0)
        return array("year" => 0, "month" => 0, "day" => 0);

    $writ_rec = $temp[0];

    $temp_duration = 0;

    if (DateModules::CompareDate($toDate, $writ_rec['execute_date']) >= 0)
        $temp_duration = DateModules::GDateMinusGDate($toDate, $writ_rec['execute_date']);

    if ($writ_rec['annual_effect'] == HALF_COMPUTED)
        $temp_duration *= 0.5;
    else if ($writ_rec['annual_effect'] == DOUBLE_COMPUTED)
        $temp_duration *= 2;
    else if ($writ_rec['annual_effect'] == NOT_COMPUTED)
        $temp_duration = 0;

    $prev_writ_duration = DateModules::ymd_to_days($writ_rec['onduty_year'], $writ_rec['onduty_month'], $writ_rec['onduty_day']);

    $duration = $prev_writ_duration + $temp_duration;
    
       
    $return = array();
    DateModules::day_to_ymd($duration, $return['year'], $return['month'], $return['day']);

    return $return;
}
开发者ID:jafarkhani,项目名称:rtfund,代码行数:54,代码来源:EmpGradReport.php

示例5: onBeforeDelete

 private function onBeforeDelete()
 {
     $res = parent::runquery(" select * from tax_tables\r\n\t\t\t\t\t\t\t\t\t\t\t\t\twhere tax_table_type_id = " . $this->tax_table_type_id);
     if (count($res) > 0) {
         parent::PushException(TAX_CAN_NOT_DELETE);
         return false;
     }
     $resstaff = parent::runquery(" select * from staff_tax_history\r\n\t\t\t\t\t\t\t\t\t\t\t\t\twhere tax_table_type_id = " . $this->tax_table_type_id);
     if (count($resstaff) > 0) {
         parent::PushException(STAFF_TAX_CAN_NOT_DELETE);
         return false;
     }
     return true;
 }
开发者ID:jafarkhani,项目名称:rtfund,代码行数:14,代码来源:tax_table_types.class.php

示例6: RemoveJobHistory

 static function RemoveJobHistory($PersonID, $row_no)
 {
     $whereParams = array();
     $whereParams[":pid"] = $PersonID;
     $whereParams[":rowid"] = $row_no;
     if (PdoDataAccess::delete("PersonJobs", " PersonID=:pid and RowNO=:rowid", $whereParams) === false) {
         parent::PushException(ER_PERSON_DEP_DEL);
         return false;
     }
     $daObj = new DataAudit();
     $daObj->ActionType = DataAudit::Action_delete;
     $daObj->RelatedPersonID = $PersonID;
     $daObj->MainObjectID = $row_no;
     $daObj->TableName = "PersonJobs";
     $daObj->execute();
     return true;
 }
开发者ID:jafarkhani,项目名称:rtfund,代码行数:17,代码来源:job_history.class.php

示例7: Remove

 static function Remove($pid)
 {
     $res = parent::runquery(" select count(*) cn from SubtractItemInfo where arrangement = " . $pid);
     if ($res[0]['cn'] > 0) {
         parent::PushException("حذف این رکورد امکان پذیر نمی باشد.");
         return false;
     }
     $result = parent::delete("priority", "PriorityID=:PID ", array(":PID" => $pid));
     if (!$result) {
         return false;
     }
     $daObj = new DataAudit();
     $daObj->ActionType = DataAudit::Action_delete;
     $daObj->MainObjectID = $pid;
     $daObj->TableName = "priority";
     $daObj->execute();
     return true;
 }
开发者ID:jafarkhani,项目名称:rtfund,代码行数:18,代码来源:priority.class.php

示例8: Remove

 static function Remove($bid)
 {
     $res = parent::runquery(" select count(*) cn from staff where bank_id = " . $bid);
     if ($res[0]['cn'] > 0) {
         parent::PushException("حذف این رکورد امکان پذیر نمی باشد.");
         return false;
     }
     $result = parent::delete("banks", "bank_id=:BID ", array(":BID" => $bid));
     if (!$result) {
         return false;
     }
     $daObj = new DataAudit();
     $daObj->ActionType = DataAudit::Action_delete;
     $daObj->MainObjectID = $bid;
     $daObj->TableName = "banks";
     $daObj->execute();
     return true;
 }
开发者ID:jafarkhani,项目名称:rtfund,代码行数:18,代码来源:banks.class.php

示例9: Remove

 static function Remove($sfid, $sbid)
 {
     $res = parent::runquery(" select count(*) cn from person_educations where sfid = " . $sfid . " and sbid = " . $sbid);
     if ($res[0]['cn'] > 0) {
         parent::PushException("این رشته در اطلاعات پایه افراد ثبت شده است به همین دلیل حذف امکان پذیر نمی باشد .");
         return false;
     }
     $result = parent::delete("study_branchs", "sfid=:sfid and sbid=:sbid", array(":sfid" => $sfid, ":sbid" => $sbid));
     if ($result === false) {
         return false;
     }
     $daObj = new DataAudit();
     $daObj->ActionType = DataAudit::Action_delete;
     $daObj->MainObjectID = $sfid;
     $daObj->SubObjectID = $sbid;
     $daObj->TableName = "study_branchs";
     $daObj->execute();
     return true;
 }
开发者ID:jafarkhani,项目名称:rtfund,代码行数:19,代码来源:study_branch.class.php

示例10: Remove

 static function Remove($uid, $cid)
 {
     $res = parent::runquery(" select count(*) cn from person_educations where university_id = " . $uid . " and country_id =" . $cid);
     if ($res[0]['cn'] > 0) {
         parent::PushException("حذف این رکورد به علت استفاده در اطلاعات پرسنل امکان پذیر نمی باشد.");
         return false;
     }
     $result = parent::delete("universities", "university_id=:UID and  country_id = :CID ", array(":UID" => $uid, ":CID" => $cid));
     if (!$result) {
         return false;
     }
     $daObj = new DataAudit();
     $daObj->ActionType = DataAudit::Action_delete;
     $daObj->MainObjectID = $uid;
     $daObj->SubObjectID = $cid;
     $daObj->TableName = "universities";
     $daObj->execute();
     return true;
 }
开发者ID:jafarkhani,项目名称:rtfund,代码行数:19,代码来源:universities.class.php

示例11: Remove

 static function Remove($CostID)
 {
     $query = " select count(*) cn \r\n\t\t\t\tfrom writs \r\n\t\t\t\t    where  cost_center_id = " . $CostID;
     $res = parent::runquery($query);
     if ($res[0]['cn'] > 0) {
         parent::PushException("این مرکز هزینه در احکام ثبت گردیده است لذا حذف امکان پذیر نمی باشد.");
         return false;
     }
     $result = parent::delete("cost_centers", "cost_center_id=:CID ", array(":CID" => $CostID));
     if ($result === false) {
         return false;
     }
     $daObj = new DataAudit();
     $daObj->ActionType = DataAudit::Action_delete;
     $daObj->MainObjectID = $CostID;
     $daObj->TableName = "cost_centers";
     $daObj->execute();
     return true;
 }
开发者ID:jafarkhani,项目名称:rtfund,代码行数:19,代码来源:cost_centers.class.php

示例12: Add

 function Add()
 {
     $query = " select * from CostCenterException where SalaryItemTypeID= " . $this->SalaryItemTypeID . " and \r\n                                                               PersonType = " . $this->PersonType . " and CostCenterID = " . $this->CostCenterID;
     $res = parent::runquery($query);
     if (count($res) > 0) {
         parent::PushException(IS_AVAILABLE);
         return false;
     }
     $return = parent::insert("CostCenterException", $this);
     if ($return === false) {
         return false;
     }
     $daObj = new DataAudit();
     $daObj->ActionType = DataAudit::Action_add;
     $daObj->MainObjectID = $this->SalaryItemTypeID;
     $daObj->SubObjectID = $this->PersonType;
     $daObj->TableName = "CostCenterException";
     $daObj->execute();
     return true;
 }
开发者ID:jafarkhani,项目名称:rtfund,代码行数:20,代码来源:cost_center_exception.class.php

示例13: Add

 function Add()
 {
     $query = " select * \r\n\t\t\t\t    from SubtractItemInfo \r\n\t\t\t\t\twhere SalaryItemTypeID= " . $this->SalaryItemTypeID . " and PersonType = " . $this->PersonType . " and \r\n\t\t\t\t\t    ( ToDate is  Null OR ToDate = '0000-00-00' )";
     $res = parent::runquery($query);
     if (count($res) > 0) {
         parent::PushException(strtr(IS_AVAILABLE, array("%0%" => $res[0]["arrangement"])));
         return false;
     }
     $return = parent::insert("SubtractItemInfo", $this);
     if ($return === false) {
         return false;
     }
     $daObj = new DataAudit();
     $daObj->ActionType = DataAudit::Action_add;
     $daObj->MainObjectID = $this->SalaryItemTypeID;
     $daObj->SubObjectID = $this->PersonType;
     $daObj->TableName = "SubtractItemInfo";
     $daObj->execute();
     return true;
 }
开发者ID:jafarkhani,项目名称:rtfund,代码行数:20,代码来源:subtract_info.class.php

示例14: date_overlap

 private function date_overlap($PID)
 {
     $whereParam = array();
     $whereParam[":pid"] = $PID;
     $query = "select  count(*) cn\n\t\t\t\t\t\t\tfrom staff_tax_history sth inner join staff s\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ton sth.staff_id = s.staff_id\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t   inner join persons p\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ton s.personid = p.personid\n\t\t\t\t\t\t\t\t\twhere\n\t\t\t\t\t\t\t\t\t\t\t  p.personid =:pid  and payed_tax_value is null  and ( sth.end_date is null or sth.end_date = '0000-00-00' )\n                                  ";
     $temp = PdoDataAccess::runquery($query, $whereParam);
     if ($temp[0][0] > 0 && $this->tax_history_id == null) {
         parent::PushException("لطفا ابتدا تاریخ انتهای رکورد قبل را پر نمایید.");
         return false;
     }
     $query = "\tselect count(*)\n\t\t\t\t\t\t\tfrom staff_tax_history sth inner join staff s\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ton sth.staff_id = s.staff_id\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t   inner join persons p\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ton s.personid = p.personid\n\t\t\t\t\t\t\t\t\twhere\n\t\t\t\t\t\t\t\t\t\t\t((sth.start_date <=:fdate AND sth.end_date>=:fdate) OR (sth.start_date>=:fdate AND sth.start_date <=:tdate)) AND\n\t\t\t\t\t\t\t\t\t\t\t  p.personid =:pid  ";
     $whereParam[":fdate"] = str_replace('/', '-', DateModules::shamsi_to_miladi($this->start_date));
     $whereParam[":tdate"] = str_replace('/', '-', DateModules::shamsi_to_miladi($this->end_date));
     if ($this->tax_history_id) {
         $query .= " and tax_history_id  != :ihid ";
         $whereParam[":ihid"] = $this->tax_history_id;
     }
     $temp = PdoDataAccess::runquery($query, $whereParam);
     if ($temp[0][0] != 0) {
         parent::PushException(ER_DATE_RANGE_OVERLAP);
         return false;
     }
     return true;
 }
开发者ID:jafarkhani,项目名称:rtfund,代码行数:24,代码来源:staff_tax.class.php

示例15: date_overlap

 private function date_overlap()
 {
     $query = "select count(*) from salary_params where \r\n\t\t\t((from_date<=:fdate AND to_date>=:fdate) OR (from_date>=:fdate AND from_date <=:tdate)) \r\n\t\t\tAND person_type=:hr AND param_type=:ptype";
     $whereParam = array();
     $whereParam[":fdate"] = $this->from_date;
     $whereParam[":tdate"] = $this->to_date;
     $whereParam[":hr"] = $this->person_type;
     $whereParam[":ptype"] = $this->param_type;
     if (isset($this->param_id)) {
         $query .= " AND param_id<>:pid";
         $whereParam[":pid"] = $this->param_id;
     }
     if (isset($this->dim1_id)) {
         $query .= " AND dim1_id = :d1id";
         $whereParam[":d1id"] = $this->dim1_id;
     }
     if (isset($this->dim2_id)) {
         $query .= " AND dim2_id = :d2id";
         $whereParam[":d2id"] = $this->dim2_id;
     }
     if (isset($this->dim3_id)) {
         $query .= " AND dim3_id = :d3id";
         $whereParam[":d3id"] = $this->dim3_id;
     }
     $temp = PdoDataAccess::runquery($query, $whereParam);
     if ($temp[0][0] != 0) {
         parent::PushException(ER_DATE_RANGE_OVERLAP);
         return true;
     }
     return false;
 }
开发者ID:jafarkhani,项目名称:rtfund,代码行数:31,代码来源:salary_params.class.php


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