public function Remove() { if (!DMS_documents::DeleteAllDocument($this->ContractID, "contract")) { ExceptionHandler::PushException("خطا در حذف مدارک"); return false; } return parent::Remove(); }
static function DeletePlan($PlanID) { $obj = new PLN_plans($PlanID); if ($obj->StepID != STEPID_RAW) { return false; } if (!DMS_documents::DeleteAllDocument($obj->PlanID, "plan")) { ExceptionHandler::PushException("خطا در حذف مدارک"); return false; } if (parent::delete("PLN_PlanItems", " PlanID=?", array($PlanID)) === false) { return false; } if (parent::delete("PLN_plans", " PlanID=?", array($PlanID)) === false) { return false; } $daObj = new DataAudit(); $daObj->ActionType = DataAudit::Action_delete; $daObj->MainObjectID = $PlanID; $daObj->TableName = "PLN_plans"; $daObj->execute(); return true; }
function DeletePage() { $DocumentID = $_POST["DocumentID"]; $ObjectID = $_POST["ObjectID"]; $RowID = $_POST["RowID"]; $obj = new DMS_documents($DocumentID); if ($obj->ObjectID != $ObjectID) { echo Response::createObjectiveResponse(false, ""); die; } $result = DMS_DocFiles::DeletePage($RowID); $dt = DMS_DocFiles::SelectAll("DocumentID=?", array($DocumentID)); if (count($dt) == 0) { $result = DMS_documents::DeleteDocument($DocumentID); } echo Response::createObjectiveResponse($result, ""); die; }
$sign = $LetterObj->IsSigned == "YES" && $dt[0]["signer"] != "" ? "background-image:url(\"" . data_uri($dt[0]["signer"], 'image/jpeg') . "\")" : ""; $content .= "<table width=100%><tr><td><div class=signDiv style=" . $sign . "><b>" . $dt[0]["SignPersonName"] . "</b><br><br>" . $dt[0]["PostName"] . "</div></td></tr></table>"; } foreach ($dt as $row) { if ($row["FromPersonID"] != $LetterObj->PersonID || $row["IsCopy"] == "NO") { continue; } $content .= "<b> رونوشت : " . ($row["sex"] == "MALE" ? "جناب آقای " : "سرکار خانم ") . $row['ToPersonName'] . "<br></b>"; } if ($LetterObj->OuterCopies != "") { $LetterObj->OuterCopies = str_replace("\r\n", " , ", $LetterObj->OuterCopies); $content .= "<br><b> رونوشت خارج از سازمان : " . $LetterObj->OuterCopies . "</b><br>"; } //.............................................................................. $imageslist = array(); $doc = DMS_documents::SelectAll("ObjectType='letter' AND ObjectID=?", array($LetterID)); if (count($doc) > 0) { $images = DMS_DocFiles::selectAll("DocumentID=?", array($doc[0]["DocumentID"])); foreach ($images as $img) { $imageslist[] = array("url" => "/office/dms/ShowFile.php?RowID=" . $img["RowID"] . "&DocumentID=" . $img["DocumentID"] . "&ObjectID=" . $LetterID, "fileType" => $img["FileType"]); } } $imageslist = json_encode($imageslist); //.............................................................................. $editable = false; if ($LetterObj->LetterType == "OUTCOME" && $LetterObj->IsSigned == "NO") { $dt = OFC_letters::SelectReceivedLetters(" AND l.LetterID=:lid", array(":lid" => $LetterID)); if ($dt->rowCount() > 0) { $editable = true; } }
function UnConfirmDocument() { $obj = new DMS_documents(); $obj->DocumentID = $_REQUEST["DocumentID"]; $obj->IsConfirm = "NOTSET"; $result = $obj->EditDocument(); echo Response::createObjectiveResponse($result, ""); die; }
<?php //----------------------------- // Programmer : // Date : 1395.08 //----------------------------- require_once '../header.inc.php'; require_once '../../office/dms/dms.class.php'; require_once 'request.class.php'; require_once inc_reportGenerator; $RequestID = $_REQUEST["RequestID"]; $ReqObj = new LON_requests($RequestID); $temp = DMS_documents::SelectAll("ObjectType='loan' AND ObjectID=? AND b1.param1=1", array($RequestID)); $SumAmount = 0; for ($i = 0; $i < count($temp); $i++) { $temp[$i]["paramValues"] = ""; $dt = PdoDataAccess::runquery("select * from DMS_DocParamValues join DMS_DocParams using(ParamID)\r\n\t\twhere DocumentID=?", array($temp[$i]["DocumentID"])); foreach ($dt as $row) { $value = $row["ParamValue"]; if ($row["ParamType"] == "currencyfield") { $value = number_format($value * 1); } $temp[$i]["paramValues"] .= $row["ParamDesc"] . " : " . $value . "<br>"; if ($row["KeyTitle"] == "amount") { $SumAmount += $row["ParamValue"] * 1; } } if ($temp[$i]["paramValues"] != "") { $temp[$i]["paramValues"] = substr($temp[$i]["paramValues"], 0, strlen($temp[$i]["paramValues"]) - 4); } }
static function DeleteRequest($RequestID) { $obj = new LON_requests($RequestID); if ($obj->StatusID != "1") { ExceptionHandler::PushException("درخواست در حال گردش قابل حذف نمی باشد"); return false; } if (!DMS_documents::DeleteAllDocument($RequestID, "loan")) { ExceptionHandler::PushException("خطا در حذف مدارک"); return false; } if (parent::delete("LON_ReqParts", " RequestID=?", array($RequestID)) === false) { ExceptionHandler::PushException("خطا در حذف شرایط"); return false; } if (parent::delete("LON_requests", " RequestID=?", array($RequestID)) === false) { ExceptionHandler::PushException("خطا در حذف درخواست"); return false; } $daObj = new DataAudit(); $daObj->ActionType = DataAudit::Action_delete; $daObj->MainObjectID = $RequestID; $daObj->TableName = "LON_requests"; $daObj->execute(); return true; }