예제 #1
0
    private void QuickDestopBind()
    {
        DataTable dtOP = objUser.GetUserQuickDesktop(Convert.ToInt32(Session["UserID"].ToString())).Tables[0];//dc.GetQuickDestop(Convert.ToInt32(Session["UserID"].ToString()));

        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;
                    }
                }
            }
        }
    }
예제 #2
0
 private void GetDestopItemByUserID(string UserID)
 {
     dtDestopItem = getUser.GetUserQuickDesktop(Convert.ToInt32(UserID)).Tables[0];//dc.GetQuickDestop(Convert.ToInt32(UserID));
     iTableCount  = dtDestopItem.Rows.Count;
 }