/// /// Utilizes all the lookup methods of all the DAL classes to create a DataSet containing all the tables related to the Products Table /// /// DataSet of AllProductData public static DataSet lookupAllProductData() { try { DataSet AllProductData = new DataSet(); AllProductData.DataSetName = "Products"; AllProductData.Tables.Add(Families.lookupFamilies().Copy()); AllProductData.Tables.Add(Departments.lookupDepartments().Copy()); AllProductData.Tables.Add(Categories.lookupCategories().Copy()); AllProductData.Tables.Add(SubCategories.lookupSubCategories().Copy()); AllProductData.Tables.Add(Products.lookupProducts().Copy()); AllProductData.Relations.Add("DepartmentCategory", AllProductData.Tables["Departments"].Columns["DepartmentId"], AllProductData.Tables["Categories"].Columns["DepartmentId"], true); AllProductData.Relations.Add("FamilyDepartment", AllProductData.Tables["Families"].Columns["FamilyId"], AllProductData.Tables["Departments"].Columns["FamilyId"], true); AllProductData.Relations.Add("CatagorySubCatagory", AllProductData.Tables["Categories"].Columns["CategoryId"], AllProductData.Tables["SubCategories"].Columns["CategoryId"]); AllProductData.Relations.Add("SubCatagoryProduct", AllProductData.Tables["SubCategories"].Columns["SubCategoryId"], AllProductData.Tables["Products"].Columns["SubCategoryId"]); return AllProductData; } catch (Exception ex) { throw ex; } }