コード例 #1
0
ファイル: contract.class.php プロジェクト: jafarkhani/rtfund
 public function __construct($id = "")
 {
     $this->DT_StartDate = DataMember::CreateDMA(DataMember::DT_DATE);
     $this->DT_EndDate = DataMember::CreateDMA(DataMember::DT_DATE);
     if ($id != '') {
         parent::FillObject($this, "\n\t\t\t\t\tselect c.* ,  t.TemplateTitle as _TemplateTitle,\n\t\t\t\t\t\tconcat_ws(' ',fname,lname,CompanyName) _PersonName\n                    from CNT_contracts c\n                    left join CNT_templates t using(TemplateID) \n\t\t\t\t\tleft join BSC_persons using(PersonID)\n\t\t\t\t\twhere c." . static::TableKey . " = :id", array(":id" => $id));
     }
 }
コード例 #2
0
ファイル: request.class.php プロジェクト: jafarkhani/rtfund
 function __construct($RequestID = "")
 {
     $this->DT_ReqDate = DataMember::CreateDMA(DataMember::DT_DATE);
     $this->DT_StartDate = DataMember::CreateDMA(DataMember::DT_DATE);
     $this->DT_EndDate = DataMember::CreateDMA(DataMember::DT_DATE);
     $this->DT_LetterDate = DataMember::CreateDMA(DataMember::DT_DATE);
     if ($RequestID != "") {
         PdoDataAccess::FillObject($this, "\r\n\t\t\t\tselect r.* , concat_ws(' ',fname,lname,CompanyName) _fullname,bf.InfoDesc _TypeDesc\r\n\t\t\t\t\tfrom WAR_requests r \r\n\t\t\t\t\tleft join BaseInfo bf on(bf.TypeID=74 AND InfoID=r.TypeID)\r\n\t\t\t\t\tleft join BSC_persons using(PersonID)\r\n\t\t\t\twhere RequestID=?", array($RequestID));
     }
 }
コード例 #3
0
ファイル: traffic.class.php プロジェクト: jafarkhani/rtfund
 function __construct($id = '')
 {
     $this->DT_ReqDate = DataMember::CreateDMA(DataMember::DT_DATE);
     $this->DT_FromDate = DataMember::CreateDMA(DataMember::DT_DATE);
     $this->DT_ToDate = DataMember::CreateDMA(DataMember::DT_DATE);
     $this->DT_SurveyDate = DataMember::CreateDMA(DataMember::DT_DATE);
     $this->DT_StartTime = DataMember::CreateDMA(DataMember::DT_TIME);
     $this->DT_EndTime = DataMember::CreateDMA(DataMember::DT_TIME);
     parent::FillObject($this, "select t.*,concat(fname,' ',lname) _fullname,\r\n\t\t\t\tbf1.InfoDesc _GoMeanDesc,bf2.InfoDesc _ReturnMeanDesc\r\n\t\t\tfrom ATN_requests t join BSC_persons using(PersonID)\r\n\t\t\t\tleft join BaseInfo bf1 on(bf1.TypeID=21 AND bf1.InfoID=GoMean)\r\n\t\t\t\tleft join BaseInfo bf2 on(bf2.TypeID=21 AND bf2.InfoID=ReturnMean)\r\n\t\t\twhere RequestID=?", array($id));
 }
コード例 #4
0
ファイル: staff_tax.class.php プロジェクト: jafarkhani/rtfund
 public function __construct($staff_id = "")
 {
     if ($staff_id != "") {
         $whereParam = array(":staff_id" => $staff_id);
         $query = "select * from staff_tax_history where staff_id=:staff_id AND payed_tax_value IS NOT NULL ";
         PdoDataAccess::FillObject($this, $query, $whereParam);
     }
     $this->DT_start_date = DataMember::CreateDMA(DataMember::DT_DATE);
     $this->DT_end_date = DataMember::CreateDMA(DataMember::DT_DATE);
 }
コード例 #5
0
 function __construct($tax_table_id = "", $tax_table_type_id = "")
 {
     if ($tax_table_id != "") {
         parent::FillObject($this, "select * from tax_tables where tax_table_id=:tid", array("tid" => $tax_table_id));
     } else {
         if ($tax_table_type_id != "") {
             $query = "select * from tax_tables\r\n                            where tax_table_type_id = :ttid ";
             $whereParam = array();
             $whereParam[":ttid"] = $tax_table_type_id;
             parent::FillObject($this, $query, $whereParam);
         }
     }
     $this->DT_from_date = DataMember::CreateDMA(DataMember::DT_DATE);
     $this->DT_to_date = DataMember::CreateDMA(DataMember::DT_DATE);
 }
コード例 #6
0
 function __construct($salary_item_type_id = "")
 {
     $this->DT_validity_start_date = DataMember::CreateDMA(DataMember::DT_DATE);
     $this->DT_validity_end_date = DataMember::CreateDMA(DataMember::DT_DATE);
     if ($salary_item_type_id != "") {
         $query = "select * from HRM_salary_item_types where salary_item_type_id=:sit";
         PdoDataAccess::FillObject($this, $query, array(":sit" => $salary_item_type_id));
     } else {
         $this->insure_include = "1";
         $this->tax_include = "1";
         $this->retired_include = "1";
         $this->pension_include = "1";
         $this->user_data_entry = "1";
         $this->backpay_include = "0";
     }
     return;
 }
コード例 #7
0
 function __construct($param_id = "", $person_type = "", $param_type = "", $param_date = "", $dim_where = "")
 {
     if ($param_id != "") {
         parent::FillObject($this, "select * from HRM_salary_params where param_id=:pid", array("pid" => $param_id));
     } else {
         if ($person_type != "" && $param_type != "" && $param_date != "") {
             $query = "select * from HRM_salary_params \r\n                            where person_type in ( :hr )  AND param_type =:typ AND from_date <= :date AND to_date >= :date ";
             $query .= $dim_where != "" ? " AND " . $dim_where : "";
             $whereParam = array();
             $whereParam[":hr"] = $person_type;
             $whereParam[":typ"] = $param_type;
             $whereParam[":date"] = $param_date;
             parent::FillObject($this, $query, $whereParam);
         }
     }
     $this->DT_from_date = DataMember::CreateDMA(DataMember::DT_DATE);
     $this->DT_to_date = DataMember::CreateDMA(DataMember::DT_DATE);
 }
コード例 #8
0
 function __construct()
 {
     $this->DT_from_date = DataMember::CreateDMA(DataMember::DT_DATE);
     $this->DT_to_date = DataMember::CreateDMA(DataMember::DT_DATE);
 }
コード例 #9
0
 function __construct()
 {
     $this->DT_start_date = DataMember::CreateDMA(DataMember::DT_DATE);
     $this->DT_end_date = DataMember::CreateDMA(DataMember::DT_DATE);
     $this->DT_flow_date = DataMember::CreateDMA(DataMember::DT_DATE);
 }
コード例 #10
0
ファイル: letter.class.php プロジェクト: jafarkhani/rtfund
 public function __construct($id = '')
 {
     $this->DT_ReminderDate = DataMember::CreateDMA(DataMember::DT_DATE);
     parent::__construct($id);
 }
コード例 #11
0
 function __construct($staff_id = "")
 {
     $this->DT_start_date = DataMember::CreateDMA(DataMember::DT_DATE);
     $this->DT_end_date = DataMember::CreateDMA(DataMember::DT_DATE);
 }
コード例 #12
0
ファイル: devotion.class.php プロジェクト: jafarkhani/rtfund
 public function __construct()
 {
     $this->DT_enlisted = DataMember::CreateDMA(DataMember::DT_INT, 0);
     $this->DT_continous = DataMember::CreateDMA(DataMember::DT_INT, 0);
     $this->DT_letter_date = DataMember::CreateDMA(DataMember::DT_DATE);
 }
コード例 #13
0
 function __construct()
 {
     $this->DT_FromDate = DataMember::CreateDMA(DataMember::DT_DATE);
     $this->DT_ToDate = DataMember::CreateDMA(DataMember::DT_DATE);
     return;
 }
コード例 #14
0
ファイル: rule.class.php プロジェクト: jafarkhani/rtfund
 function __construct($id = '')
 {
     $this->DT_FromDate = DataMember::CreateDMA(DataMember::DT_DATE);
     $this->DT_ToDate = DataMember::CreateDMA(DataMember::DT_DATE);
     parent::__construct($id);
 }
コード例 #15
0
 function __construct($salary_item_type_id = "")
 {
     $this->DT_list_date = DataMember::CreateDMA(DataMember::DT_DATE);
     return;
 }
コード例 #16
0
ファイル: plan.class.php プロジェクト: jafarkhani/rtfund
 function __construct($id = "")
 {
     $this->DT_EventDate = DataMember::CreateDMA(DataMember::DT_DATE);
     parent::__construct($id);
 }
コード例 #17
0
ファイル: dependent.class.php プロジェクト: jafarkhani/rtfund
 function __construct()
 {
     $this->DT_birth_date = DataMember::CreateDMA(DataMember::DT_DATE);
     $this->DT_marriage_date = DataMember::CreateDMA(DataMember::DT_DATE);
     $this->DT_separation_date = DataMember::CreateDMA(DataMember::DT_DATE);
 }
コード例 #18
0
ファイル: writ.class.php プロジェクト: jafarkhani/rtfund
 /**
  * اگر تابع را بدون ورودي فراخواني کنيد يک شي خالي برمي گرداند
  * اگر فقط شماره حکم را بفرستيد شي را با آخرين نسخه آن حکم پر مي کند
  * اگر هم شماره حکم و هم نسخه حکم را به تابع بفرستيد شي مربوط به آن را برمي گرداند
  *
  * @param string $writ_id
  * @param string $writ_ver
  *
  */
 function __construct($writ_id = "", $writ_ver = "", $staffID = "")
 {
     if ($writ_id != "") {
         if (empty($writ_ver)) {
             $query = " SELECT writ_id,writ_ver max_writ_ver\n\t                \t\tFROM HRM_writs\n\t                \t\tWHERE  writ_id = :wid and staff_id=:stid\n\t                \t\tORDER BY writ_ver desc ";
             $whereParam = array(":wid" => $writ_id, ":stid" => $staffID);
             $temp = parent::runquery($query, $whereParam);
             $this->writ_ver = $temp[0]['max_writ_ver'];
         }
         $writ_ver = $writ_ver == "" ? $this->writ_ver : $writ_ver;
         $query = "select * from HRM_writs where writ_id=:wid and writ_ver=:wver and staff_id =:sid ";
         parent::FillObject($this, $query, array(":wid" => $writ_id, ":wver" => $writ_ver, ":sid" => $staffID));
     }
     //  این قسمت در زمان ثبت در دیتا بیس مورد استفاده قرار می گیرد چون تاریخ است بررسی میکند و ان را میلادی می کند و در دیتا بیس ذخیره می نماید.
     $this->DT_corrective_date = DataMember::CreateDMA(DataMember::DT_DATE);
     $this->DT_ref_letter_date = DataMember::CreateDMA(DataMember::DT_DATE);
     $this->DT_send_letter_date = DataMember::CreateDMA(DataMember::DT_DATE);
     $this->DT_issue_date = DataMember::CreateDMA(DataMember::DT_DATE);
     $this->DT_execute_date = DataMember::CreateDMA(DataMember::DT_DATE);
     $this->DT_pay_date = DataMember::CreateDMA(DataMember::DT_DATE);
     $this->DT_contract_start_date = DataMember::CreateDMA(DataMember::DT_DATE);
     $this->DT_contract_end_date = DataMember::CreateDMA(DataMember::DT_DATE);
     $this->DT_warning_date = DataMember::CreateDMA(DataMember::DT_DATE);
 }
コード例 #19
0
ファイル: post.class.php プロジェクト: jafarkhani/rtfund
 function __construct($post_id = "")
 {
     $this->DT_validity_start = DataMember::CreateDMA(DataMember::DT_DATE);
     $this->DT_validity_end = DataMember::CreateDMA(DataMember::DT_DATE);
     if ($post_id == "") {
         return;
     }
     parent::FillObject($this, "select p.*,concat(pfname,' ',plname) as _fullName, jf.jcid as _jcid\r\n\t\t\tfrom `position` p\r\n\t\t\t\tleft join staff as s using(staff_id)\r\n                left join persons as ps using(PersonID)\r\n\t\t\t\tleft join job_fields jf using(jfid)\r\n\t\t\t\t\r\n\t\t\twhere p.post_id=?", array($post_id));
 }
コード例 #20
0
ファイル: vote.class.php プロジェクト: jafarkhani/rtfund
 function __construct($FormID = '')
 {
     $this->DT_StartDate = DataMember::CreateDMA(DataMember::DT_DATE);
     $this->DT_EndDate = DataMember::CreateDMA(DataMember::DT_DATE);
     parent::__construct($FormID);
 }
コード例 #21
0
ファイル: bases.class.php プロジェクト: jafarkhani/rtfund
 function __construct()
 {
     $this->DT_ExecuteDate = DataMember::CreateDMA(DataMember::DT_DATE);
 }
コード例 #22
0
 private static function DataMemberValidation($action, $obj, $key, $value)
 {
     $checkDT;
     eval("\$checkDT = (isset(\$obj['DT_" . $key . "'])) ? \$obj['DT_" . $key . "'] : null;");
     if ($checkDT === null) {
         return $value;
     }
     //...................................
     if ($action == "insert" && DataMember::GetNotNullValue($checkDT) && ($value == PDONULL || $value == "")) {
         parent::PushException("فیلد " . $key . " نمی تواند مقدار null داشته باشد.");
         return false;
     }
     //...................................
     $defaultValue = DataMember::GetDefaultValue($checkDT);
     if (empty($value)) {
         if ($defaultValue !== null) {
             $value = $defaultValue;
         } else {
             return $value;
         }
     }
     //...................................
     if (!DataMember::IsValid($checkDT, $value)) {
         return false;
     }
     //...................................
     switch ($checkDT["DataType"]) {
         case DataMember::DT_DATE:
             if ($value != PDONOW) {
                 $value = DateModules::shamsi_to_miladi($value);
             }
             break;
         case DataMember::DT_TIME:
             if (strlen($value) > 8) {
                 $value = substr($value, strlen($value) - 8);
             }
     }
     return $value;
 }