/** * @param AssetGroup $item */ public function addGroup(AssetGroup $item) { $assetPointers = $item->getAssetPointers(); foreach ($assetPointers as $assetPointer) { if (!$this->contains($assetPointer)) { $this->assetPointers[$assetPointer->getIdentifier()] = $assetPointer; } } }
<?php include_once "../class/Config.php"; include_once "../class/AssetGroup.php"; $showGroup = new AssetGroup(); $dbGroup = new config(); $searchType = $_GET["assetTypeCode"]; //$searchType = "01"; $arr = $showGroup->getAssetGroupByType($searchType); ?> * <select id="addAssetGroup"> <option value="00">หมวดครุภัณฑ์</option> <?php while ($rowG = $dbGroup->fetch_array($arr)) { ?> <?php echo "<option value='" . $rowG['assetGroupId'] . "'>"; echo $rowG['assetTypeCode'] . "" . $rowG['assetGroupCode'] . " " . $rowG['assetGroupName'] . "</option>"; ?> <?php } ?> </select>
<?php include_once "../class/AssetGroup.php"; $addGroup = new AssetGroup(); $addGcode = $_GET["addGroupCode"]; $addGname = $_GET["addGroupName"]; $addTypeId = $_GET["addTypeId"]; $addGroup->setValues($addGcode, $addGname, $addTypeId); $addGroup->addAssetGroup();
<?php include_once "../class/Config.php"; include_once "../class/Asset.php"; include_once "../class/AssetType.php"; include_once "../class/AssetGroup.php"; $showAsset = new Asset(); $showType = new AssetType(); $showGroup = new AssetGroup(); $dbAsset = new config(); $year = "2556"; $Type = "01"; $Group = "01"; $asset = "001"; /* $year = $_GET['assetYear']; $Type = $_GET['assetType']; $Group = $_GET['assetGroup']; $asset = $_GET['assetCode']; */ $yearS = $year - 543; $command = "WHERE assetAddDate LIKE '%" . $year . "%' AND assetTypeCode = '" . $type . "' AND assetGroupCode = '" . $group . "'"; $arrYear = $showAsset->getShowAssetYear(); $arrType = $showType->getAssetType(); //$showGroup->setAssetTypeCode($arrType); $arrGroup = $showGroup->getAssetGroupByType("01"); $arrAsset = $showAsset->getAssetBy($command); ?> <select id="assetYearQR" onchange="changePrintQR();"> <option value="0000">ประจำปี</option>
<?php include_once "../class/Config.php"; include_once "../class/AssetGroup.php"; $editGroup = new AssetGroup(); $dbGroup = new config(); $editId = $_GET["id"]; //$editId = "01"; $editGroup->setId($editId); $arr = $editGroup->getEditAssetGroup(); $data_array = array(); $no = 1; $stat = 0; while ($res = $dbGroup->fetch_object($arr)) { $data_array[$res->id]['id'] = $res->id; $data_array[$res->id]['assetGroupCode'] = $res->assetGroupCode; $data_array[$res->id]['assetGroupName'] = $res->assetGroupName; $data_array[$res->id]['assetTypeCode'] = $res->assetTypeCode; } echo json_encode($data_array);
<?php include_once "../class/AssetGroup.php"; $delGroup = new AssetGroup(); $delId = $_GET["assetGroupid"]; $delGroup->setAssetGroupId($delId); $delGroup->delAssetGroup();
<?php include_once "../class/AssetGroup.php"; $updateGroup = new AssetGroup(); $id = $_GET["id"]; $groupName = $_GET["editGname"]; $updateGroup->setId($id); $updateGroup->setValues(null, $groupName, null); $updateGroup->editAssetGroup();
<?php include_once "../class/AssetGroup.php"; $updateGroup = new AssetGroup(); $assetGroupId = $_GET["assetGroupId"]; $groupName = $_GET["editGname"]; $updateGroup->setAssetGroupId($assetGroupId); $updateGroup->setAssetGroupName($groupName); $updateGroup->editAssetGroup();
<?php include_once "../class/Config.php"; include_once "../class/AssetGroup.php"; $assGroup = new AssetGroup(); $db = new config(); ?> <table class="table table-bordered"> <thead> <tr> <th style="width: 5%; text-align:center">ลำดับ</th> <th style="width: 28%; text-align:center">รหัสประเภทครุภัณฑ์</th> <th style="width: 28%; text-align:center">รหัสหมวดครุภัณฑ์</th> <th style="width: 28%; text-align:center">ชื่อหมวดครุภัณฑ์</th> <th style="width: 10%; text-align:center">แก้ไข</th> <th style="width: 10%; text-align:center">ลบ</th> </tr> </thead> <tbody> <?php $no = 1; $typeCode = $_GET["id"]; //$typeCode = $_GET["id"]; $arr = $assGroup->getAssetGroup(); $arr2 = $assGroup->getAssetGroupByType($typeCode); if ($typeCode == "00") { $cmd = $arr; } else { $cmd = $arr2; }
<?php include_once "../class/Config.php"; include_once "../class/AssetGroup.php"; $chkGroup = new AssetGroup(); $dbCheck = new config(); $addGroupCode = $_GET["addGroupCode"]; $addTypeCode = $_GET["addTypeCode"]; //$addGroupCode = "01"; //$addTypeCode = "02"; $chkGroup->setAssetGroupCode($addGroupCode); $chkGroup->setAssetTypeCode($addTypeCode); $arr = $chkGroup->checkAssetGroup(); $rows = $dbCheck->num_rows($arr); $i = 0; if ($rows > $i) { echo $rows; } else { echo $i; } ?>