public AddressVerificationRequest GetAddressVerificationRequest(string addressId)
        {
            UserId.IsNullOrWhiteSpaceThrowArgumentException("Please log in");
            addressId.IsNullOrWhiteSpaceThrowArgumentException("No Address Id");


            AddressMain address = Find(addressId);

            address.IsNullThrowException("Address Not found");


            return(load_AddressVerificationRequestModel(addressId, address));
        }
Пример #2
0
        //private static void gmailSettings(out string smtpServer, out int portInt, out string emailAddress, out string userName, out string from, out string password)
        //{
        //    //gmail
        //    password = "******";
        //    smtpServer = "smtp.gmail.com";

        //    emailAddress = "*****@*****.**";
        //    userName = "******";

        //    string port = "587";
        //    bool success = int.TryParse(port, out portInt);

        //    if (!success)
        //    {
        //        portInt = 587;
        //    }

        //    //this does not work.
        //    from = "*****@*****.**";
        //}


        public void UpdateAndSaveDefaultAddress(string addressId, GlobalObject globalObject)
        {
            UserId.IsNullOrWhiteSpaceThrowArgumentException("not logged in");
            addressId.IsNullOrWhiteSpaceThrowArgumentException("AddressId is null");

            EmailAddress emailAddress = Find(addressId);

            emailAddress.IsNullThrowException("Address");


            Person person = UserBiz.GetPersonFor(UserId);

            person.IsNullThrowException("Person not found");

            person.DefaultEmailAddressId = addressId;
            //PersonBiz.UpdateAndSave(person);

            ControllerCreateEditParameter param = new ControllerCreateEditParameter();

            param.Entity       = person as ICommonWithId;
            param.GlobalObject = globalObject;

            UpdateAndSave(param);
        }