Beispiel #1
0
 public static function DRP_poid_kindid($formName, &$poid, &$kindid, $PostFieldName, $KindFieldName, $PostSelectedID = "", $KindSelectedID = "", $masterWidth = "")
 {
     $obj = new MaserDetail_DROPDOWN();
     $obj->Master_formName = $formName;
     $obj->Master_datasource = PdoDataAccess::runquery("SELECT InfoID ,Title FROM Basic_Info where typeid = 27");
     $obj->Master_id = $FacFieldName;
     $obj->Master_valuefield = "InfoID";
     $obj->Master_textfield = "Title";
     $obj->Master_Width = $masterWidth;
     $obj->Detail_datasource = array(array("InfoID" => "5", "sid" => "1", "title" => "مدیر"), array("InfoID" => "5", "sid" => "2", "title" => "معاون مدیر"), array("InfoID" => "5", "sid" => "3", "title" => "رئیس اداره"), array("InfoID" => "5", "sid" => "4", "title" => "معاون اداره"), array("InfoID" => "5", "sid" => "5", "title" => "کارشناس مسئول"));
     $obj->Detail_id = $GroupFieldName;
     $obj->Detail_valuefield = "%jfid%";
     $obj->Detail_textfield = "%title%";
     $obj->Detail_masterfield = "jcid";
     return $obj->bind_dropdown($jcid, $jfid, $PostSelectedID, $KindSelectedID);
 }
Beispiel #2
0
function DRP_State_City(&$stateoutput, &$cityOutput, $stateFieldName, $cityFieldName, $stateSelectedID = "", $citySelectedID = "", $stateExtraRow = "", $cityExraRow = "", $stateWidth = "")
{
    $obj = new MaserDetail_DROPDOWN();
    $obj->Master_datasource = PdoDataAccess::runquery("select state_id,ptitle from states");
    if (!empty($stateExtraRow)) {
        $obj->Master_datasource = array_merge(array(array("state_id" => "-1", "ptitle" => $stateExtraRow)), $obj->Master_datasource);
    }
    $obj->Master_id = $stateFieldName;
    $obj->Master_valuefield = "%state_id%";
    $obj->Master_textfield = "%ptitle%";
    $obj->Detail_datasource = PdoDataAccess::runquery("select * from cities");
    if (!empty($cityExraRow)) {
        $obj->Detail_datasource = array_merge(array(array("state_id" => "-1", "ptitle" => $cityExraRow)), $obj->Detail_datasource);
    }
    $obj->Detail_id = $cityFieldName;
    $obj->Detail_valuefield = "%city_id%";
    $obj->Detail_textfield = "%ptitle%";
    $obj->Detail_masterfield = "state_id";
    $obj->bind_dropdown($stateoutput, $cityOutput, $stateSelectedID, $citySelectedID);
}