Exemplo n.º 1
0
        private bool IsValidEntry()
        {
            int j = 0;

            if (CmbUserName.Text.ISNullOrWhiteSpace())
            {
                toolTip1.Show("Select a user for change permission", CmbUserName, CmbUserName.Location.X, CmbUserName.Height - 100, 1500);
                //MessageBox.Show("Select a user for change permission", "Permissin", MessageBoxButtons.OK, MessageBoxIcon.Stop);
                CmbUserName.Focus();
                return(false);
            }
            for (int i = 0; i < chklistbox.Items.Count; i++)
            {
                if (chklistbox.GetItemChecked(i))
                {
                    j = 1;
                    break;
                }
            }
            if (j == 0)
            {
                toolTip1.Show("Please Give atleast One permission ", chklistbox, 80, chklistbox.Height - 250, 1500);
                //MessageBox.Show("Please Give atleast One permission", "Permissin", MessageBoxButtons.OK, MessageBoxIcon.Stop);
                chklistbox.Focus();
                return(false);
            }
            return(true);
        }
Exemplo n.º 2
0
        public PermissionWindows()
        {
            InitializeComponent();
            DefaultClass df = new DefaultClass();

            CmbUserName.AddUserName();
            Getchkbox();
        }