private void QuickDestopBind() { DataTable dtOP = userDal.GetUserQuickDesktop(Convert.ToInt32(Session["UserID"].ToString())).Tables[0]; if (dtOP.Rows.Count > 0) { foreach (DataRow dr in dtOP.Rows) { foreach (TreeNode tnRoot in this.sTreeModule.Nodes) { bool IsAllSelected = true; foreach (TreeNode tnSub in tnRoot.ChildNodes) { bool IsSubAllSelected = true; if (tnSub.Value == dr["ModuleID"].ToString()) { tnSub.Checked = true; break; } if (!tnSub.Checked) { IsSubAllSelected = false; } } if (IsAllSelected) { tnRoot.Checked = true; } } } } }
private void GetDestopItemByUserID(string UserID) { dtDestopItem = userDal.GetUserQuickDesktop(Convert.ToInt32(UserID)).Tables[0];//dc.GetQuickDestop(Convert.ToInt32(UserID)); iTableCount = dtDestopItem.Rows.Count; }