コード例 #1
0
ファイル: PropAssessUsesEncode.php プロジェクト: armic/erpts
 function updatePropAssessUses($xmlStr)
 {
     if (!($domDoc = domxml_open_mem($xmlStr))) {
         return false;
     }
     $propAssessUses = new PropAssessUses();
     $propAssessUses->parseDomDocument($domDoc);
     $ret = $propAssessUses->updateRecord();
     return $ret;
 }
コード例 #2
0
ファイル: PropAssessUsesDetails.php プロジェクト: armic/erpts
 function getPropAssessUsesDetails($propAssessUsesID)
 {
     $propAssessUses = new PropAssessUses();
     $propAssessUses->selectRecord($propAssessUsesID);
     if (!($domDoc = $propAssessUses->getDomDocument())) {
         return false;
     } else {
         $xmlStr = $domDoc->dump_mem(true);
         return $xmlStr;
     }
 }
コード例 #3
0
ファイル: PropAssessUsesEncode.php プロジェクト: armic/erpts
 function Main()
 {
     switch ($this->formArray["formAction"]) {
         case "edit":
             $PropAssessUsesDetails = new SoapObject(NCCBIZ . "PropAssessUsesDetails.php", "urn:Object");
             if (!($xmlStr = $PropAssessUsesDetails->getPropAssessUsesDetails($this->formArray["propAssessUsesID"]))) {
                 $this->tpl->set_block("rptsTemplate", "Table", "TableBlock");
                 $this->tpl->set_var("TableBlock", "record not found");
             } else {
                 if (!($domDoc = domxml_open_mem($xmlStr))) {
                     $this->tpl->set_block("rptsTemplate", "Table", "TableBlock");
                     $this->tpl->set_var("TableBlock", "error xmlDoc");
                 } else {
                     $propAssessUses = new PropAssessUses();
                     $propAssessUses->parseDomDocument($domDoc);
                     $this->formArray["propAssessUsesID"] = $propAssessUses->getPropAssessUsesID();
                     $this->formArray["code"] = $propAssessUses->getCode();
                     $this->formArray["description"] = $propAssessUses->getDescription();
                     $this->formArray["value"] = $propAssessUses->getValue();
                     $this->formArray["status"] = $propAssessUses->getStatus();
                 }
             }
             break;
         case "save":
             $PropAssessUsesEncode = new SoapObject(NCCBIZ . "PropAssessUsesEncode.php", "urn:Object");
             if ($this->formArray["propAssessUsesID"] != "") {
                 $PropAssessUsesDetails = new SoapObject(NCCBIZ . "PropAssessUsesDetails.php", "urn:Object");
                 if (!($xmlStr = $PropAssessUsesDetails->getPropAssessUsesDetails($this->formArray["propAssessUsesID"]))) {
                     exit("record not found");
                 } else {
                     if (!($domDoc = domxml_open_mem($xmlStr))) {
                         $this->tpl->set_block("rptsTemplate", "Table", "TableBlock");
                         $this->tpl->set_var("TableBlock", "error xmlDoc");
                     } else {
                         $propAssessUses = new PropAssessUses();
                         $propAssessUses->parseDomDocument($domDoc);
                         $propAssessUses->setPropAssessUsesID($this->formArray["propAssessUsesID"]);
                         $propAssessUses->setCode($this->formArray["code"]);
                         $propAssessUses->setDescription($this->formArray["description"]);
                         $propAssessUses->setValue($this->formArray["value"]);
                         $propAssessUses->setStatus($this->formArray["status"]);
                         $propAssessUses->setDomDocument();
                         $doc = $propAssessUses->getDomDocument();
                         $xmlStr = $doc->dump_mem(true);
                         if (!($ret = $PropAssessUsesEncode->updatePropAssessUses($xmlStr))) {
                             exit("error update");
                         }
                     }
                 }
             } else {
                 $propAssessUses = new PropAssessUses();
                 $propAssessUses->setPropAssessUsesID($this->formArray["propAssessUsesID"]);
                 $propAssessUses->setCode($this->formArray["code"]);
                 $propAssessUses->setDescription($this->formArray["description"]);
                 $propAssessUses->setValue($this->formArray["value"]);
                 $propAssessUses->setStatus($this->formArray["status"]);
                 $propAssessUses->setDomDocument();
                 $doc = $propAssessUses->getDomDocument();
                 $xmlStr = $doc->dump_mem(true);
                 if (!($ret = $PropAssessUsesEncode->savePropAssessUses($xmlStr))) {
                     exit("error save");
                 }
             }
             $this->formArray["propAssessUsesID"] = $ret;
             header("location: PropAssessUsesEncode.php");
             exit;
             break;
         case "cancel":
             header("location: PropAssessUsesList.php");
             exit;
             break;
         default:
             $this->tpl->set_block("rptsTemplate", "PropAssessUsesID", "PropAssessUsesIDBlock");
             $this->tpl->set_var("PropAssessUsesIDBlock", "");
             $this->tpl->set_block("rptsTemplate", "ACK", "ACKBlock");
             $this->tpl->set_var("ACKBlock", "");
     }
     $this->setForm();
     $this->tpl->parse("templatePage", "rptsTemplate");
     $this->tpl->finish("templatePage");
     $this->tpl->p("templatePage");
 }
コード例 #4
0
ファイル: PropAssessUsesRecords.php プロジェクト: armic/erpts
 function updateStatus($statusIDArray = "")
 {
     $rows = 0;
     $this->selectRecords();
     foreach ($this->arrayList as $key => $value) {
         $value->status = "inactive";
         $value->updateRecord();
     }
     foreach ($statusIDArray as $key => $value) {
         $propAssessUses = new PropAssessUses();
         $propAssessUses->selectRecord($value);
         $propAssessUses->status = "active";
         $propAssessUses->updateRecord();
         $rows++;
     }
     return $rows;
 }