Example #1
0
 public MembershipCreateStatus createUser(MembershipUser user)
 {
     Customer newUser = new Customer();
     newUser.Name = user.UserName;
     newUser.Password = user.ProviderUserKey.ToString();
     newUser.IsAdmin = false;
     try
     {
         this.ctx.Customers.AddObject(newUser);
         this.ctx.SaveChanges();
     }
     catch (Exception e)
     {
         return MembershipCreateStatus.UserRejected;
     }
     return MembershipCreateStatus.Success;
 }
Example #2
0
        private void FixupCustomer(Customer previousValue)
        {
            if (previousValue != null && previousValue.Animations.Contains(this))
            {
                previousValue.Animations.Remove(this);
            }

            if (Customer != null)
            {
                if (!Customer.Animations.Contains(this))
                {
                    Customer.Animations.Add(this);
                }
                if (CustomerId != Customer.CustomerId)
                {
                    CustomerId = Customer.CustomerId;
                }
            }
        }