<?
include_once("clsUmGroup.php");

class 
umgroupr extends umgroup{
    
function 
GetRecord(){
    
$ret parent::GetRecord();
//    $this->GpID = $this->result['GpID'];
//    $this->GpNameT = $this->result['GpNameT'];
    
return $ret;
}
    
//function RsSystemGroup($StID=""){
//    if ($StID==""){
//        $sql ="SELECT StID, StNameT, GpID, GpNameT
//                FROM umsystem, umgroup
//                WHERE StID = GpStID
//                ORDER BY StID, GpID";
//    }else{
//        $sql ="SELECT StID, StNameT, GpID, GpNameT
//                FROM umsystem, umgroup
//                WHERE StID=$StID and StID = GpStID 
//                ORDER BY StID, GpID";
//    }
//    $this->SetQuery($sql);
//}
    
function selectHTMLByStID($st$name$ID=""){
    
$s="<select name=\"$name\">\n";
    
$s.="<option value=\"\">---เลือกระบบงาน---\n";
    
$this->RSumGroupByStID($st);
    while(
$this->GetRecord()){
        
$s.="<option value=\"$this->GpID\" ";
        
$s.=($this->GpID==$ID) ? "Selected" "" ;
        
$s.=">$this->GpNameT\n";
    }
    return 
$s.="</select>\n";
}

}
?>