function BindDropDown2($dropdownName, $tableName, $keyField, $valueField) { $obj = new DROPDOWN(); $obj->datasource = PdoDataAccess::runquery("select * from " . $tableName); $obj->valuefield = "%" . $keyField . "%"; $obj->textfield = "%" . $valueField . "%"; $obj->Style = 'style=\'width:98%\' class=\'x-form-text\''; $obj->id = $dropdownName; $obj->datasource = array_merge(array(array($keyField => "-1", $valueField => "---")), $obj->datasource); return $obj->bind_dropdown(); }
static function DRP_LevelType($dropName, $selectedId = "", $extraRow = "", $width = "90%") { require_once inc_component; $obj = new DROPDOWN(); $obj->datasource = parent::runquery("select * from Basic_Info where TypeID=26"); $obj->valuefield = "%InfoID%"; $obj->textfield = "%Title%"; $obj->Style = 'class="x-form-text x-form-field" style="width:' . $width . '"'; $obj->id = $dropName; if (!empty($extraRow)) { $obj->datasource = array_merge(array(array("InfoID" => "-1", "Title" => $extraRow)), $obj->datasource); } return $obj->bind_dropdown($selectedId); }
public static function DRP_DependentSupportStatus($dropdownName, $selectedID = "", $style = "") { $query = "select * from Basic_Info where TypeID = 31"; $obj = new DROPDOWN(); $temp = PdoDataAccess::runquery($query); $obj->datasource = $temp; $obj->valuefield = "%InfoID%"; $obj->textfield = "%Title%"; $obj->Style = 'class="x-form-text x-form-field" style="' . $style . '"'; $obj->id = $dropdownName; return $obj->bind_dropdown($selectedID); }