Example #1
0
        /// <summary>
        /// load the screen with data
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void RoleAuthorityControlForm_Load(object sender, EventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            BindTreeView();
            Cursor.Current = Cursors.Default;
            RoleName_txt.Select();

            //if (IsAdminUser())
            //{
            //foreach (TreeNode tn in RoleAuthorityDetails_tv.Nodes)
            //{
            //    if (tn.Level == 0 && tn.Tag.Equals(ADMIN))
            //    {
            //        tn.HideCheckBox();

            //        foreach (TreeNode sub1 in tn.Nodes)
            //        {
            //            sub1.HideCheckBox();

            //            foreach (TreeNode sub2 in sub1.Nodes)
            //            {
            //                sub2.HideCheckBox();

            //                foreach (TreeNode sub3 in sub2.Nodes)
            //                {
            //                    sub3.HideCheckBox();
            //                }
            //            }
            //        }
            //    }
            //}
            //}
        }
Example #2
0
        /// <summary>
        /// form load event , loads role data
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void AddRoleForm_Load(object sender, EventArgs e)
        {
            RoleCode_txt.Select();

            if (string.Equals(mode, CommonConstants.MODE_UPDATE))
            {
                LoadUserData(updateData);

                RoleCode_txt.Enabled = false;
                RoleName_txt.Select();
            }
        }