Beispiel #1
0
        // Нажата кнопка выбора сотрудника
        private void btSelectUser_Click(object sender, RoutedEventArgs e)
        {
            SelectUser _dwSU = null;

            if (sender is string)
            {
                if ((string)sender == "loginUserForChange")
                {
                    _dwSU = new SelectUser(_ADSession, _principalContext, loginUserForChange.Text);
                    _dwSU.ShowDialog();
                }
            }
            else
            {
                _dwSU = new SelectUser(_ADSession, _principalContext);
                _dwSU.ShowDialog();
            }
            if (_dwSU.DialogResult == true)
            {
                loginUserForChange.Text            = _dwSU.SelectedUser.Login;
                _userIsSelected                    = true;
                loginUserForChange.FontWeight      = FontWeights.Bold;
                loginUserForChange.TextDecorations = TextDecorations.Underline;
            }
        }
Beispiel #2
0
        // Нажата кнопка выбора адреса пересылки
        private void btSelectUserForward_Click(object sender, RoutedEventArgs e)
        {
            SelectUser _dwSU = null;

            if (sender is string)
            {
                if ((string)sender == "mailForwarding")
                {
                    _dwSU = new SelectUser(_ADSession, _principalContext, mailForwarding.Text);
                    _dwSU.ShowDialog();
                }
            }
            else
            {
                _dwSU = new SelectUser(_ADSession, _principalContext);
                _dwSU.ShowDialog();
            }
            if (_dwSU.DialogResult == true)
            {
                mailForwarding.Text            = _dwSU.SelectedUser.Mail;
                _forwardingMailIsSelected      = true;
                mailForwarding.FontWeight      = FontWeights.Bold;
                mailForwarding.TextDecorations = TextDecorations.Underline;
            }
        }