Пример #1
0
        /// <summary>
        /// Method that will check whether or not the submitted email address and company of this new administrator
        /// already exists in the database.
        /// </summary>
        /// <param name="emailAddress"></param>
        /// <param name="company"></param>
        /// <returns></returns>
        private bool DoesUserOrCompanyAlreadyExist(string emailAddress, string company)
        {
            List <user>          listOfUsers     = serviceClient.GetExistingUsersAsync().Result.ToList();
            List <companydetail> listOfCompanies = serviceClient.getExistingCompaniesAsync().Result.ToList();

            if (!CheckUserExistance(listOfUsers) && !CheckCompanyExistance(listOfCompanies))
            {
                return(false);
            }
            return(true);
        }