예제 #1
0
        public ThemeObj GetById(string name)
        {
            ThemeObj result = new ThemeObj();
            ThemeObjFilter filter = new ThemeObjFilter();
            filter.Name = name;
            List<ThemeObj> list = new ThemesObjManager().GetByFilter(filter);
            if (list.Count > 0)
                result = list[0];

            return result;
        }
예제 #2
0
 public Dictionary<string, string> GetList()
 {
     Dictionary<string, string> res = new Dictionary<string, string>();
     ThemeObjFilter filter = new ThemeObjFilter();
     List<ThemeObj> list = GetByFilter(filter);
     foreach (ThemeObj item in list)
     {
         res.Add(item.Name, item.Name);
     }
     return res;
 }
예제 #3
0
        public List<ThemeObj> GetByFilter(ThemeObjFilter filter)
        {
            List<ThemeObj> result = new List<ThemeObj>();
            string path = HttpContext.Current.Request.MapPath("~/App_Themes");
            DirectoryInfo dir = new DirectoryInfo(path);
            DirectoryInfo[] dirs = dir.GetDirectories();

            foreach (DirectoryInfo currDir in dirs)
            {
                if (currDir.Name.ToLower() != ".svn")
                {
                    ThemeObj item = new ThemeObj(currDir.Name);
                    result.Add(item);
                }
            }
            return result;
        }
예제 #4
0
 protected void ObjDsTemplates_Selecting(object sender, ObjectDataSourceSelectingEventArgs e)
 {
     ThemeObjFilter filter = new ThemeObjFilter();
     e.InputParameters["filter"] = filter;
 }