private static void LoadSettings() { Name = "N/A"; SiteName = "Website đang phát triển"; SiteUrl = "http://loacalhost"; EmailAdmin = "*****@*****.**"; EmailSite = "*****@*****.**"; ManagerBy = "Deverloper"; Facebook = ""; Twitter = ""; Youtube = ""; GooglePlus = ""; CatalogueId = 0; string catalogueid = ConfigurationManager.AppSettings["catalogueid"] ?? "0"; // name database var catalogueRepo = new CatalogueRepo(DbConnectionString); string message = ""; var catalogueView = catalogueRepo.GetCatalogue(int.Parse(catalogueid), out message); if (catalogueView != null) { Name = catalogueView.CatalogueName; SiteName = catalogueView.SiteName; SiteUrl = catalogueView.SiteUrl; EmailAdmin = catalogueView.EmailAdmin; EmailSite = catalogueView.EmailSite; ManagerBy = catalogueView.ManagerBy; Address = !String.IsNullOrWhiteSpace(catalogueView.Address) ? catalogueView.Address : ""; Phones = !String.IsNullOrWhiteSpace(catalogueView.Phones) ? catalogueView.Phones : ""; CatalogueId = catalogueView.Id; PaymentMethodInfo = "Giao hàng miễn phí cho đơn hàng trên 200.000 vnđ và trong bán kính 3 km. Tính phí với đơn hàng nhỏ hơn 200.000 vnđ hay bán kính lớn hơn 3km"; SubTotalFreeFreight = 200000M; //social netword Facebook = !String.IsNullOrWhiteSpace(catalogueView.Facebook) ? catalogueView.Facebook : ""; Twitter = !String.IsNullOrWhiteSpace(catalogueView.Twitter) ? catalogueView.Twitter : ""; Youtube = !String.IsNullOrWhiteSpace(catalogueView.Youtube) ? catalogueView.Youtube : ""; GooglePlus = !String.IsNullOrWhiteSpace(catalogueView.GooglePlus) ? catalogueView.GooglePlus : ""; } }
private static void LoadSettings() { Name = "N/A"; SiteName = "Website đang phát triển"; SiteUrl = "http://loacalhost"; EmailAdmin = EmailSite = "*****@*****.**"; ManagerBy = "Deverloper"; Facebook = ""; Twitter = ""; Youtube = ""; GooglePlus = ""; CatalogueId = 0; MetaKeyword = ""; MetaKeyword = ""; Author = ""; string catalogueid = ConfigurationManager.AppSettings["catalogueid"] ?? "0"; // name database var catalogueRepo = new CatalogueRepo(DbConnectionString); string message = ""; var catalogueView = catalogueRepo.GetCatalogue(int.Parse(catalogueid), out message); if (catalogueView != null) { Name = catalogueView.CatalogueName; SiteName = catalogueView.SiteName; SiteUrl = catalogueView.SiteUrl; EmailAdmin = catalogueView.EmailAdmin; EmailSite = catalogueView.EmailSite; ManagerBy = catalogueView.ManagerBy; Address = !String.IsNullOrWhiteSpace(catalogueView.Address) ? catalogueView.Address : ""; Phones = !String.IsNullOrWhiteSpace(catalogueView.Phones) ? catalogueView.Phones : ""; CatalogueId = catalogueView.Id; //social netword Facebook = !String.IsNullOrWhiteSpace(catalogueView.Facebook) ? catalogueView.Facebook : ""; Twitter = !String.IsNullOrWhiteSpace(catalogueView.Twitter) ? catalogueView.Twitter : ""; Youtube = !String.IsNullOrWhiteSpace(catalogueView.Youtube) ? catalogueView.Youtube : ""; GooglePlus = !String.IsNullOrWhiteSpace(catalogueView.GooglePlus) ? catalogueView.GooglePlus : ""; } }