示例#1
0
 /// <summary>
 /// Добавляет пользователя в коллекцию RecipientsEmployees
 /// </summary>
 /// <returns></returns>
 /// <remarks>
 /// Если пользователь уже есть в списке добавление произведено не будет
 /// </remarks>
 void AddEmployeeToRecipientsEmployees(Employee employee)
 {
     if (!RecipientsEmployees.Contains(employee))
     {
         RecipientsEmployees.Add(employee);
     }
 }
示例#2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="recipientsString"></param>
        /// <returns></returns>
        string CheckRecipientString(string recipientsString)
        {
            RecipientsEmployees.Clear();
            UnrecognizedUsernames = string.Empty;
            string[] recipients   = recipientsString.Split(SpecialWords.SpecialWords.Semicolon.ToCharArray());
            string   errorMessage = string.Empty;

            if ((recipients.Length == 1) &&
                (string.Compare(recipients[0], string.Empty) == 0))
            {
                return(Properties.Resources.RecipientsStringNotBeEmpty);
            }
            string[] usernames = ParseToUsernames(recipients);
            string   result    = ProcessUsernames(usernames);

            UpdateRecipientsByRecipientsEmployees();
            return(result);
        }