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">Email id(s)</label>
                                        <div class="col-lg-10">
                                            <input type="email" name="emailIds" placeholder="Email" value="<?php 
echo $highValueRule->getEmail();
?>
" required="required" class="form-control"> 
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-lg-2 control-label">Mobile No(s)</label>
                                        <div class="col-lg-10">
                                            <input type="text" name="mobileNos" placeholder="Mobile" value="<?php 
echo $highValueRule->getMobile();
?>
" required="required" class="form-control"> 
                                        </div>
                                    </div> 
                                    <div class="form-group">
                                        <label class="col-lg-2 control-label">Parameter</label>
                                        <div class="col-lg-10 parameterTD">
                                            <?php 
echo $chDDown;
?>
 
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-lg-2 control-label">Highest Value</label>