Ejemplo n.º 1
0
        public static SYSConfig GetItemConfigByHome()
        {
            //var SiteConfig = HttpContext.Session.GetString("SiteConfig");
            SYSConfig Item = SYSParamsService.GetItemConfig();

            return(Item);
        }
Ejemplo n.º 2
0
        public static SYSConfig GetItemConfig()
        {
            SearchSYSParams dto = new SearchSYSParams()
            {
                IdType = "IdConfig"
            };
            List <SYSParams>            listCauHinh        = SYSParamsService.GetList(dto);
            SYSConfig                   itemCauHinhHeThong = new SYSConfig();
            Dictionary <string, string> dAttributes        = new Dictionary <string, string>();

            for (int k = 0; k < listCauHinh.Count(); k++)
            {
                string type  = listCauHinh[k].Title;
                string value = listCauHinh[k].Introtext;
                dAttributes.Add(type, value);
            }
            itemCauHinhHeThong.Email              = dAttributes["Email"];
            itemCauHinhHeThong.WebsiteName        = dAttributes["WebsiteName"];
            itemCauHinhHeThong.CompanyName        = dAttributes["CompanyName"];
            itemCauHinhHeThong.Slogan             = dAttributes["Slogan"];
            itemCauHinhHeThong.Phone              = dAttributes["Phone"];
            itemCauHinhHeThong.Facebook           = dAttributes["Facebook"];
            itemCauHinhHeThong.Twitter            = dAttributes["Twitter"];
            itemCauHinhHeThong.Footer             = dAttributes["Footer"];
            itemCauHinhHeThong.SEODescription     = dAttributes["SEODescription"];
            itemCauHinhHeThong.SEOKeyword         = dAttributes["SEOKeyword"];
            itemCauHinhHeThong.Contact            = dAttributes["Contact"];
            itemCauHinhHeThong.Map                = dAttributes["Map"];
            itemCauHinhHeThong.Youtube            = dAttributes["Youtube"];
            itemCauHinhHeThong.Address            = dAttributes["Address"];
            itemCauHinhHeThong.CountYTST          = dAttributes["CountYTST"];
            itemCauHinhHeThong.Hotline            = dAttributes["Hotline"];
            itemCauHinhHeThong.TaiSao             = dAttributes["TaiSao"];
            itemCauHinhHeThong.LuotKham           = dAttributes["LuotKham"];
            itemCauHinhHeThong.BenhNhanHaiLong    = dAttributes["BenhNhanHaiLong"];
            itemCauHinhHeThong.PhauThuatThanhCong = dAttributes["PhauThuatThanhCong"];
            return(itemCauHinhHeThong);
        }