コード例 #1
0
 private function addChannels($channels, $units, $folderSeq)
 {
     $i = 0;
     $chNoArr = array();
     $CCDS = ChannelConfigurationDataStore::getInstance();
     foreach ($channels as $ch) {
         $chConf = new ChannelConfiguration();
         $chConf->setChannelName($ch);
         $number = $i + 1;
         $chConf->setChannelNumber($number);
         $chConf->setFolderSeq($folderSeq);
         $chConf->setChannelStatusFlag(1);
         $chConf->setChannelUnit($units[$i]);
         $CCDS->Save($chConf);
         $chNoArr[$ch] = $number;
         $i++;
     }
     return $chNoArr;
 }
コード例 #2
0
 $folder = $folders[$selSeq];
 if ($folder->getStationType() == "stack" || $folder->getStationType() == "effluent") {
     $isdataExist = $WSDS->isStackDataExist($selSeq);
 } else {
     $isdataExist = $WFDS->isFileDataExist($selSeq);
 }
 $channlConfigs = $CDS->FindByFolder($selSeq);
 $chSeqs = $_POST["chseq"];
 $count = 1;
 foreach ($chSeqs as $chseq) {
     if (!empty($chseq)) {
         $chConfigObj = $channlConfigs[intval($chseq)];
     } else {
         $chConfigObj = new ChannelConfiguration();
         $chConfigObj->setFolderSeq($selSeq);
         $chConfigObj->setChannelStatusFlag(1);
     }
     if (!$chConfigObj) {
         continue;
     }
     $chNo = $_POST["chno" . $count];
     $chName = $_POST["chName" . $count];
     $chUnit = $_POST["chUnit" . $count];
     $chSubStation = $_POST["substation" . $count];
     $prescribedLimit = $_POST["prescribedlimit" . $count];
     $chConfigObj->setChannelName($chName);
     $chConfigObj->setChannelNumber($chNo);
     $chConfigObj->setChannelUnit($chUnit);
     $chConfigObj->setChannelStation($chSubStation);
     if (empty($prescribedLimit)) {
         $prescribedLimit = 0;
コード例 #3
0
 public function populateObject($rsItem)
 {
     $seq_ = $rsItem["configseq"];
     $folderSeq_ = $rsItem["folderseq"];
     $channelNumber_ = $rsItem["channelnumber"];
     $channelName_ = $rsItem["channelname"];
     $channelStatusFlag_ = $rsItem["channelstatusflag"];
     $channelUnit_ = $rsItem["channelunit"];
     $channelStation_ = $rsItem["channelstation"];
     $prescribedLimit_ = $rsItem["prescribedlimit"];
     $cc = new ChannelConfiguration();
     $cc->setSeq($seq_);
     $cc->setFolderSeq($folderSeq_);
     $cc->setChannelNumber($channelNumber_);
     $cc->setChannelName($channelName_);
     $cc->setChannelStatusFlag($channelStatusFlag_);
     $cc->setChannelUnit($channelUnit_);
     $cc->setChannelStation($channelStation_);
     $cc->setPrescribedLimit($prescribedLimit_);
     return $cc;
 }
コード例 #4
0
ファイル: CronWQD.php プロジェクト: munishsethi777/eliveui
 function ConfigurationParsing($value, $folder)
 {
     echo "\n\n Starting with Configuration file:  " . $value;
     $configs = ParserConfig::parseConfig($value, $folder->getSeq());
     $CCDS = ChannelConfigurationDataStore::getInstance();
     $CCDS->Delete($folder->getSeq());
     foreach ($configs as $config) {
         $channelConfig = new ChannelConfiguration();
         $channelConfig->setFolderSeq($folder->getSeq());
         $channelConfig->setChannelNumber(trim($config[0]));
         $channelConfig->setChannelStatusFlag(trim($config[1]));
         $channelConfig->setChannelName(trim($config[2]));
         $channelConfig->setChannelUnit(trim($config[3]));
         $CCDS->Save($channelConfig);
     }
     echo "\n Unlinking configuration file" . $value;
     unlink($value);
 }