Example #1
0
 public void SetValue(string key, string value)
 {
     T_ConfigServices service = new T_ConfigServices();
     T_Config config = service.GetByKey(key);
     if (config != null)
     {
         config.Value = value;
         service.UpdateConfig(config);
     }
 }
Example #2
0
        public PartialViewResult GetAdvertisment(string positionKey)
        {
            List<T_Slide> SlideList = new List<T_Slide>();
            T_ConfigServices _configServices = new T_ConfigServices();
            T_Config Model = _configServices.GetByKey(positionKey);
            if (Model != null)
            {
                int GroupSildeID = 0;
                bool result = int.TryParse(Model.Value, out GroupSildeID);

                if (result && GroupSildeID > 0)
                {
                    T_SlideServices slideServices = new T_SlideServices();
                    SlideList = slideServices.GetSlideByGroupID(GroupSildeID).Where(m=> m.Enable == true).ToList();

                }
            }
            return PartialView("GetAdvertisment", SlideList);
        }