/// <summary>
/// 绑定下拉列表。Edward.Lyons
/// </summary>
/// <param name="SqlList">SQL语句</param>
/// <param name="Field">从数据库取出的数据的字段名称</param>
/// <param name="DropDown">DropDownList对象名称</param>
/// <param name="Conn">OracleConnection对象名称</param>
public void Page_DropDownList
(string SqlList, string Field, System.Web.UI.WebControls.DropDownList DropDown, OracleConnection Conn)
{
OracleDataReader Reader = Databank_Command_DataRead(SqlList, Conn);
try
{
DropDown.DataSource = Reader;
DropDown.DataTextField = Field;
DropDown.DataValueField = Field;
if(Field == "COMPANYNAME")
{
DropDown.DataValueField = "COMPANYCODE";
}
DropDown.DataBind();
Databank_Close(Reader);
}
finally
{
Databank_Close(Reader);
}
}