idropdowntree 成员
#region idropdowntree 成员
public dictionary<string, string> getchildcategory(string parentid)
{
string where = "parentid='" + parentid + "'";
if (string.isnullorempty(parentid))
{
where = "parentid is null or parentid='" + guid.empty + "'";
}
list<goodscategorybean> _goodscategorylist = selectlist(0, where, string.empty, false);
if (_goodscategorylist != null && _goodscategorylist.count > 0)
{
dictionary<string, string> categorylist = new dictionary<string, string>();
for (int i = 0; i < _goodscategorylist.count; i++)
{
categorylist.add(_goodscategorylist[i].id.tostring(), _goodscategorylist[i].gategoryname);
}
return categorylist;
}//51aspx.com
return null;
}
public interface.common.dropdowntree dropdowntree
{
get { return new interface.common.dropdowntree(this); }
}
#endregion
页面调用代码: 类名.dropdowntree.bindtodropdownlist(下拉控件id);