public function Save(HighValueRule $highValueRule)
 {
     try {
         $SQL = self::$INSERT;
         if ($highValueRule->getSeq() != null && $highValueRule->getSeq() != "" && $highValueRule->getSeq() > 0) {
             $SQL = self::$UPDATE;
         }
         $conn = self::$db->getConnection();
         $stmt = $conn->prepare($SQL);
         $stmt->bindValue(':folderseq', $highValueRule->getFolderSeq());
         $stmt->bindValue(':email', $highValueRule->getEmail());
         $stmt->bindValue(':mobile', $highValueRule->getMobile());
         $stmt->bindValue(':parameterchannelno', $highValueRule->getParameter());
         $stmt->bindValue(':highvalue', $highValueRule->getHighValue());
         $stmt->bindValue(':frequency', $highValueRule->getFrequency());
         $isActive = 0;
         if ($highValueRule->getIsActive() == "true" || $highValueRule->getIsActive() == 1) {
             $isActive = 1;
         }
         $stmt->bindValue(':isactive', $isActive);
         $stmt->bindValue(':rulehits', $highValueRule->getRuleHits());
         $type = $highValueRule->getStationType();
         $maxSeq = $highValueRule->getLastRuleHitFileDataSeq();
         $seq = $highValueRule->getSeq();
         if (empty($seq)) {
             if ($type == "stack" || $type == "effluent") {
                 $wqdsds = WQDStackDataStore::getInstance();
                 $maxSeq = $wqdsds->getMaxSeq();
             } else {
                 $WQDDS = WQDDataDataStore::getInstance();
                 $maxSeq = $WQDDS->getMaxSeq();
             }
         }
         $highValueRule->setLastRuleHitFileDataSeq($maxSeq);
         //$stmt->bindValue(':lastrulehitwqdfiledataseq',$maxSeq);
         $stmt->bindValue(':lastrulehitwqdfiledataseq', $highValueRule->getLastRuleHitFileDataSeq());
         if ($SQL == self::$UPDATE) {
             $stmt->bindValue(':seq', $highValueRule->getSeq());
         } else {
             $stmt->bindValue(':rulestartwqdfiledataseq', $maxSeq);
         }
         $stmt->execute();
         $error = $stmt->errorInfo();
         if ($error[2] != "") {
             throw new Exception($error[2]);
         }
     } catch (Exception $e) {
         $logger = Logger::getLogger($ConstantsArray["logger"]);
         $logger->error("Error During Save High Value Rule : - " . $e->getMessage());
     }
 }
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-lg-2 control-label">Highest Value</label>
                                        <div class="col-lg-10">
                                            <input type="text" name="highValue" placeholder="Highest Value" value="<?php 
echo $highValueRule->getHighValue();
?>
" required="required" class="form-control">  
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-lg-2 control-label">Frequency</label>
                                        <div class="col-lg-10">
                                            <input type="text" name="frequency" placeholder="Frequency" value="<?php 
echo $highValueRule->getFrequency();
?>
" required="required" class="form-control">   
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-lg-2 control-label">Activate</label>
                                        <div class="col-lg-10">
                                            <?php 
if ($highValueRule->getIsActive() == "" || $highValueRule->getIsActive() == "1") {
    $checked_On = "checked";
} else {
    $checked_Off = "checked";
}
?>
                                            <input name="active" value="true" type="radio"  <?php