Ejemplo n.º 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;
        }
Ejemplo n.º 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;
 }
Ejemplo n.º 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;
        }
Ejemplo n.º 4
0
 protected void ObjDsTemplates_Selecting(object sender, ObjectDataSourceSelectingEventArgs e)
 {
     ThemeObjFilter filter = new ThemeObjFilter();
     e.InputParameters["filter"] = filter;
 }