Example #1
0
        /// <summary>
        /// Edit event
        /// </summary>
        private void Edit()
        {
            UserDetailForm detail;
            User           current = new User();

            if (currentUser.Role == Role.Commands ||
                currentUser.Role == Role.FileTransfer ||
                currentUser.Role == Role.All)
            {
                return;
            }
            if (currentUser.Role == Role.Administrator ||
                currentUser.Role == Role.Default)
            {
                current = (User)((gridView1.GetFocusedRow()));
            }
            else
            {
                current = currentUser;
            }
            detail = new UserDetailForm(current);

            detail.ShowModalDialog();
            if (detail.IsRefresh)
            {
                InitGrid();
            }
        }
Example #2
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            UserDetailForm detail = new UserDetailForm(null);

            detail.ShowModalDialog();
            if (detail.IsRefresh)
            {
                InitGrid();
            }
        }
Example #3
0
        void btnEdit_Click(object sender, System.EventArgs e)
        {
            UserDetailForm detail;
            User           current = new User();

            if (currentUser.Role == Role.Administrator)
            {
                current = (User)((gridView1.GetFocusedRow()));
            }
            else
            {
                current = currentUser;
            }
            detail = new UserDetailForm(current);

            detail.ShowModalDialog();
            if (detail.IsRefresh)
            {
                InitGrid();
            }
        }