Beispiel #1
0
 public frmMain(Int32 userID, Int32 companyID)
 {
     //Int32 appUserID, currentCompanyID;
     //appUserID = userID;
     //currentCompanyID = companyID;
     CurrentCompany = frmMainManager.LoadCompany(companyID);
     CurrentUser    = UserManager.GetItem(userID);
     curUserRights  = UserRightsManager.GetUserRights(userID);
     InitializeComponent();
 }
Beispiel #2
0
        private void cboUser_SelectedIndexChanged(object sender, EventArgs e)
        {
            string[] objList = null;
            if (!flgLoading)
            {
                ClearNodes();
                objList = UserRightsManager.GetUserRights(Convert.ToInt32(cboUser.SelectedValue));

                if (objList != null)
                {
                    foreach (string str in objList)
                    {
                        TreeNode[] tNode = tvwRights.Nodes.Find(str, true);
                        if (tNode != null)
                        {
                            tNode[0].Checked = true;
                        }
                    }
                    tvwRights.Nodes[0].Expand();
                }
            }
        }