/// <summary>
        /// Saves registered users (records moves to this table after email varification process completed successfully)
        /// </summary>
        /// <param name="registeredUserBO"></param>
        /// <returns></returns>
        public int SaveRegisteredUser(RegisteredUserBO registeredUserBO)
        {
            tblRegisteredUserDto tblRegUserDto = new tblRegisteredUserDto();
            Mapper.CreateMap<RegisteredUserBO, tblRegisteredUserDto>();
            Mapper.Map(registeredUserBO, tblRegUserDto);

            RegistrationProvider objUserProfileDataProvider = new RegistrationProvider();
            return objUserProfileDataProvider.SaveRegisteredUser(tblRegUserDto);
        }
        /// <summary>
        /// Saves registered users (after user peforms email varification)
        /// </summary>
        /// <param name="registeredUserBO"></param>
        /// <returns></returns>
        public int SaveRegisteredUser(RegisteredUserBO registeredUserBO)
        {
            int result = 0;
            if (ValidateRegisteredUser(registeredUserBO))
            {

                RegistrationProviderDAL objRegistrationProvider = new RegistrationProviderDAL();
                result = objRegistrationProvider.SaveRegisteredUser(registeredUserBO);
            }
            return result;
        }
        public void SaveRegisteredUser()
        {
            RegisteredUserBO objRegisteredUserBO = new RegisteredUserBO();

            objRegisteredUserBO.UserEmail = Cryptography.Encrypt("*****@*****.**");
            objRegisteredUserBO.CountryOfRegistration = 101;
            objRegisteredUserBO.NewsLetter = true;
            objRegisteredUserBO.RegistrationDate = DateTime.Now;
            objRegisteredUserBO.RegistrationIP = "192.168.1.101";
            objRegisteredUserBO.ConfirmationDate = DateTime.Now;
            objRegisteredUserBO.ConfirmationIP = "192.168.1.10";

            RegistrationBLL objRegistrationBL = new RegistrationBLL();
            int returnVal = objRegistrationBL.SaveRegisteredUser(objRegisteredUserBO);

            Assert.AreEqual(1, returnVal, "It should return 1");
        }
 /// <summary>
 /// Validates registered user data
 /// </summary>
 /// <param name="registeredUserBO"></param>
 /// <returns></returns>
 private bool ValidateRegisteredUser(RegisteredUserBO registeredUserBO)
 {
     bool isValid = true;
     try
     {
         if (isValid) isValid = ValidateBLL.CheckNullOrEmpty(registeredUserBO.UserEmail); //checking for null or empty
         if (isValid) isValid = ValidateBLL.CheckNullOrEmpty(registeredUserBO.CountryOfRegistration); //checking for null or empty
         if (isValid) isValid = ValidateBLL.CheckNullOrEmpty(registeredUserBO.NewsLetter); //checking for null or empty
         if (isValid) isValid = ValidateBLL.CheckNullOrEmpty(registeredUserBO.RegistrationDate); //checking for null or empty
         if (isValid) isValid = ValidateBLL.CheckNullOrEmpty(registeredUserBO.RegistrationIP); //checking for null or empty
         if (isValid) isValid = ValidateBLL.CheckNullOrEmpty(registeredUserBO.ConfirmationDate); //checking for null or empty
     }
     catch
     {
         isValid = false;
     }
     return isValid = true;
 }