Exemplo n.º 1
0
        private void ShowDepartmentForm()
        {
            if (!AppPermissions.Check("DepartmentForm"))
            {
                MessageBox.Show("У вас нет разрешения на использование этой части приложения.");

                return;
            }

            if (_departmentFormOpened)
            {
                DepartmentForm.Activate();
                DepartmentForm.Focus();
                return;
            }

            DepartmentForm        = new DepartmentList(ApiEndpoint);
            _departmentFormOpened = true;
            DepartmentForm.Show();
            _departmentFormOpened = false;
        }