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); }
public static int DeleteImportSourceTypes(string importSourceIds) { ManagerHelper.CheckPrivilege(Privilege.ImportSourceTypeDelete); int result; if (string.IsNullOrEmpty(importSourceIds)) { result = 0; } else { result = new ImportSourceTypeDao().DeleteImportSourceTypes(importSourceIds); } return(result); }
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); }