Exemplo n.º 1
0
        // for fb
        public Account(ITradelrRepository repository, string email, string loginPage, AccountPlanType plan, string affiliate)
        {
            this.repository = repository;
            this.email      = email;
            this.loginPage  = loginPage;
            this.plan       = plan;
            this.affiliate  = affiliate;

            // create subdomain entry
            mastersubdomain = new MASTERsubdomain
            {
                flags                   = 0,
                name                    = loginPage,
                total_outofstock        = 0,
                total_contacts_public   = 0,
                total_contacts_private  = 0,
                total_contacts_staff    = 0,
                total_invoices_sent     = 0,
                total_invoices_received = 0,
                total_orders_sent       = 0,
                total_orders_received   = 0,
                total_products_mine     = 0,
                uniqueid                = Utility.GetRandomString(10),
                accountType             = plan.ToString(),
                accountTypeStatus       = (int)AccountPlanPaymentStatus.TRIAL,                 // start date for 30-day trial campaign
                trialExpiry             = DateTime.UtcNow.AddDays(30),
                affiliateID             = AffiliateUtil.GenerateAffiliateID()
            };
        }
Exemplo n.º 2
0
 public static AccountPlanLimits ToAccountLimit(this AccountPlanType type)
 {
     if (AccountPlanLimits.PLANS.ContainsKey(type))
     {
         return(AccountPlanLimits.PLANS[type]);
     }
     Syslog.Write("can't find accountlimit key");
     return(null);
 }
Exemplo n.º 3
0
 // for email
 public Account(ITradelrRepository repository, string email, string password, string passwordConfirm, string loginPage, AccountPlanType plan, string affiliate)
     : this(repository, email, loginPage, plan, affiliate)
 {
     this.password        = password;
     this.passwordConfirm = passwordConfirm;
 }