public ResourceCategoryCollection QueryOtherFirstCategoryList(Guid versionCode) { ResourceCategoryCollection categorys = new ResourceCategoryCollection(); new ResourceCategory(); using (DataTable table = publicDbOpClass.DataTableQuary("select * from EPM_Res_Category where (VersionCode='" + versionCode.ToString() + "')and(ResourceStyle not in (1,2,3))and(CategoryParentCode = '')")) { int count = table.Rows.Count; for (int i = 0; i < count; i++) { categorys.Add(this.DataRowToResourceCategoryInfo(table.Rows[i])); } } return(categorys); }
public ResourceCategoryCollection QuerySubCategoryList(Guid versionCode, string parentCategoryCode) { ResourceCategoryCollection categorys = new ResourceCategoryCollection(); string str = ""; str = "select VersionCode,CategoryCode, CategoryParentCode,CategoryName, ResourceStyle, ResourceType,ChildNumber,IsValid "; using (DataTable table = publicDbOpClass.DataTableQuary(string.Format(str + " from EPM_Res_Category where (VersionCode ='{0}') and (CategoryParentCode = '{1}') and (IsValid = 1)", versionCode.ToString(), parentCategoryCode))) { if (table.Rows.Count <= 0) { return(categorys); } int count = table.Rows.Count; for (int i = 0; i < count; i++) { categorys.Add(this.DataRowToResourceCategoryInfo(table.Rows[i])); } } return(categorys); }