private void tvwGoods_Restore() { if (tvwGoods.TreeSource != null) { ((DataTable)tvwGoods.TreeSource.DataSource).DataSet.Tables.Remove("dtTree"); } oGoods.FilterHostsList = null; if (nHostID.HasValue || nUserHostID.HasValue) { if (nHostID.HasValue) { oGoods.FilterHostsList = nHostID.ToString(); } if (nUserHostID.HasValue) { oGoods.FilterHostsList = nUserHostID.ToString(); } } else { if (ucSelectRecordID_Hosts.IsSelectedExist) { oGoods.FilterHostsList = ucSelectRecordID_Hosts.GetIdString(); } } oGoods.FillDataTree("GROUP", tvwGoods.IsActualOnly); tvwGoods.Restore(oGoods.DS.Tables["TableDataTree"]); tvwGoods.SelectedNode = tvwGoods.TopNode; tvwGoods.Refresh(); }