日期:2014-05-17 浏览次数:20851 次
public void GetCheckedID(TreeListNode parentNode)
{
if (parentNode.Nodes.Count == 0)
{
return;//递归终止
}
foreach (TreeListNode node in parentNode.Nodes)
{
if (node.CheckState == CheckState.Checked)
{
DataRowView drv = treePower.GetDataRecordByNode(node) as DataRowView;
if (drv != null)
{
int ID = (int)drv["EventID"];
lstCheckedID.Add(ID);
}
}
GetCheckedID(node);
}
}