Beispiel #1
0
        public ActionResult Index()
        {
            ViewBag.Message = "Welcome to ASP.NET MVC!";
            var DomainsRepository = new DomainsRepository();
            var d = DomainsRepository.Table.ToList();

            return View();
        }
Beispiel #2
0
        public int DeleteDomainLinks(int[] domainLinkIDs)
        {
            var domain = DomainsRepository.GetByDomainLinkID(domainLinkIDs[0]);

            DomainLinkRepository.DeleteDomainLinks(domainLinkIDs);
            return((domain != null) ?
                   domain.DomainID :
                   0);
        }
Beispiel #3
0
        public tbl_Domains GetDomainByName(string domainName)
        {
            tbl_Domains domain = DomainsRepository.GetByDomainName(domainName);

            if (domain == null)
            {
                domain = DomainsRepository.GetByDomainLinkName(domainName);
            }

            return(domain);
        }
Beispiel #4
0
        public tbl_Domains SaveDomain(string address, string name, string phone, string consumerKey, string consumerSecret, string css, string defaultDesc, string keywords,
                                      int langID, string title, string desc, string domainName, string email, string googleAnalytics, string googleAnalyticsCode, bool googleAnalyticsVisible,
                                      string robots, string headline, int homePageID, int?launchYear, bool primaryDomain, string share, string twitterSecret, string twitterToken, string twitterUser, bool updateTwitter,
                                      bool isMailChimpEnabled, string mailChimpAPIKey, string mailChimpListID, bool isCommuniGatorEnabled, string communiGatorUser, string communiGatorPassword,
                                      List <tbl_SettingsValue> settingsValues, bool IsPaypalPayment, bool IsSagePayPayment, bool IsSecureTradingPayment, EventViewType eventView, bool enableEventSale,
                                      bool enableProductSale, string theme, bool devMode, int domainID, bool isCoockieConsentEnabled, bool isStripePayment, List <tbl_Social> socialValues, bool customRouteHandler)
        {
            if (String.IsNullOrEmpty(domainName))
            {
                return(null);
            }

            var domain = DomainsRepository.SaveDomain(address, name, phone, consumerKey, consumerSecret,
                                                      css, defaultDesc, keywords, langID, title, desc, domainName, email, googleAnalytics, googleAnalyticsCode,
                                                      googleAnalyticsVisible, robots, headline, homePageID, launchYear, primaryDomain, share, twitterSecret,
                                                      twitterToken, twitterUser, updateTwitter, isMailChimpEnabled, mailChimpAPIKey, mailChimpListID,
                                                      isCommuniGatorEnabled, communiGatorUser, communiGatorPassword, eventView, enableEventSale,
                                                      enableProductSale, theme, devMode, isCoockieConsentEnabled, customRouteHandler, domainID);

            if (domain != null)
            {
                if (domainID == 0)
                {
                    foreach (var value in Enum.GetValues(typeof(SiteMapType)))
                    {
                        SiteMapType type = (SiteMapType)Enum.Parse(typeof(SiteMapType), value.ToString());

                        var sitemap = SitemapRepository.SaveSiteMap(string.Empty, 1, 0, domain.DomainID, String.Empty, false, false, type.ToString(), null,
                                                                    (decimal)0.5, String.Empty, FriendlyUrl.CreateFriendlyUrl(type.ToString()), true, false, ContentType.Content, type.ToString(), 0, 0, (int)type, true);

                        if (sitemap != null)
                        {
                            ContentRepository.SaveContent(String.Empty, String.Empty, type.ToString(), 0, string.Empty, type.ToString(), type.ToString(),
                                                          string.Empty, 0, string.Empty, string.Empty, string.Empty, type.ToString(), string.Empty, false, sitemap.SiteMapID, 0);
                        }
                    }

                    socialValues = this.GetDefaultSocialValues(domain.DomainID);
                }

                PaymentDomainRepository.UpdateStatus(IsPaypalPayment, PaymentType.PayPal, domain.DomainID);
                PaymentDomainRepository.UpdateStatus(IsSagePayPayment, PaymentType.SagePay, domain.DomainID);
                PaymentDomainRepository.UpdateStatus(IsSecureTradingPayment, PaymentType.SecureTrading, domain.DomainID);
                PaymentDomainRepository.UpdateStatus(isStripePayment, PaymentType.Stripe, domain.DomainID);
                SettingsValuesRepository.Save(settingsValues, domain.DomainID);
                SocialRepository.SaveMultipleSocial(socialValues);
                return(domain);
            }

            return(null);
        }
Beispiel #5
0
 public tbl_Domains GetDomainByID(int domainID)
 {
     return(DomainsRepository.GetByID(domainID));
 }
Beispiel #6
0
 public SelectList GetAllDomainsAsSelectList(int selectDomainID)
 {
     return(new SelectList(DomainsRepository.GetAll().OrderBy(d => d.DO_CompanyName), "DomainID", "DO_CompanyName", selectDomainID));
 }
Beispiel #7
0
 public List <tbl_Domains> GetAllDomains()
 {
     return(DomainsRepository.GetAll().ToList());
 }
Beispiel #8
0
 public bool DeleteDomain(int domainID)
 {
     return(DomainsRepository.DeleteDomain(domainID));
 }