public static string JoinEmailList(string FirstName, string LastName, string Email, int SpanishLevel)
        {
            try
            {
                //user EmailListUser = new user();

                //EmailListUser.account_status = "Email List";
                //EmailListUser.email = Email;
                //EmailListUser.first_name = FirstName;
                //EmailListUser.last_name = LastName;

                //UserService.SaveNewUser(EmailListUser);

                App_Code.RALTProfile MyProfile = new App_Code.RALTProfile();

                MyProfile = MyProfile.GetRALTProfile();

                MyProfile.Email = Email;

                MyProfile.FirstName       = FirstName;
                MyProfile.Language        = "EN";
                MyProfile.LastName        = LastName;
                MyProfile.SpanishLevel    = SpanishLevel;
                MyProfile.LastVisitedDate = DateTime.UtcNow;

                Guid UN;

                if (Guid.TryParse(MyProfile.UserName, out UN))
                {
                    MyProfile.ProfileType = "EmailList";
                }
                else
                {
                    MyProfile.ProfileType = "Account";
                }


                MyProfile.SaveRALTProfile(MyProfile);

                return("Success");
            }

            catch (Exception ex)
            {
                return(ex.Message);
            }
        }
        public static string DismissEmailList()
        {
            try
            {
                App_Code.RALTProfile MyProfile = new App_Code.RALTProfile();

                MyProfile = MyProfile.GetRALTProfile();

                MyProfile.ProfileType     = "Dismiss";
                MyProfile.Language        = "EN";
                MyProfile.LastVisitedDate = DateTime.UtcNow;

                MyProfile.SaveRALTProfile(MyProfile);

                return("Success");
            }

            catch (Exception ex)
            {
                return(ex.Message);
            }
        }
Ejemplo n.º 3
0
        void Profile_MigrateAnonymous(object sender, ProfileMigrateEventArgs e)
        {
            try
            {
                App_Code.RALTProfile annProfile = new App_Code.RALTProfile();

                annProfile = annProfile.GetRALTProfile(e.AnonymousID);

                if (annProfile.CopyFlag == false)
                {
                    App_Code.RALTProfile MyProfile = new App_Code.RALTProfile();

                    MyProfile = MyProfile.GetRALTProfile();

                    //CopyData
                    MyProfile.CopyFlag        = true;
                    MyProfile.Email           = annProfile.Email;
                    MyProfile.FirstName       = annProfile.FirstName;
                    MyProfile.Language        = annProfile.Language;
                    MyProfile.LastName        = annProfile.LastName;
                    MyProfile.LastUpdatedDate = annProfile.LastUpdatedDate;
                    MyProfile.LastVisitedDate = annProfile.LastVisitedDate;
                    MyProfile.ProfileType     = "Account";
                    MyProfile.SpanishLevel    = annProfile.SpanishLevel;
                    MyProfile.IsAnonymous     = false;

                    MyProfile.SaveRALTProfile(MyProfile);

                    annProfile.CopyFlag    = true;
                    annProfile.ProfileType = "Account";
                    annProfile.SaveRALTProfile(annProfile);

                    // AnonymousIdentificationModule.ClearAnonymousIdentifier();
                }
            }
            catch { }
        }