Ejemplo n.º 1
0
        public static IList <ImportSourceTypeInfo> GetAllImportSourceTypes(int categoryId)
        {
            IList <ImportSourceTypeInfo> list = new List <ImportSourceTypeInfo>();

            System.Data.DataTable importSourceTypes = new ImportSourceTypeDao().GetAllImportSourceTypes(categoryId);
            System.Data.DataRow[] array             = importSourceTypes.Select();

            for (int i = 0; i < array.Length; i++)
            {
                list.Add(DataMapper.ConvertDataRowToImportSourceType(array[i]));
            }

            return(list);
        }
Ejemplo n.º 2
0
        public static IList <ImportSourceTypeInfo> GetAllImportSourceTypes()
        {
            IList <ImportSourceTypeInfo> importSourceTypeInfo = HiCache.Get("DataCache-ImportSourceTypeInfo") as List <ImportSourceTypeInfo>;

            if (importSourceTypeInfo != null)
            {
                return(importSourceTypeInfo);
            }
            IList <ImportSourceTypeInfo> list = new List <ImportSourceTypeInfo>();

            System.Data.DataTable importSourceTypes = new ImportSourceTypeDao().GetAllImportSourceTypes();
            System.Data.DataRow[] array             = importSourceTypes.Select();
            for (int i = 0; i < array.Length; i++)
            {
                list.Add(DataMapper.ConvertDataRowToImportSourceType(array[i]));
            }
            HiCache.Insert("DataCache-ImportSourceTypeInfo", list, 60);//3¸öСʱ»º´æ
            return(list);
        }