protected void Load_ProductsType() { List <ProductType> productTypeList = ProductTypeRepo.GetProductType(); for (int i = 0; i < productTypeList.Count; i++) { TableRow newRow = new TableRow(); ProductTypeTable.Controls.Add(newRow); TableCell productTypeIdCell = new TableCell(); productTypeIdCell.Controls.Add(new Label() { Text = productTypeList.ElementAt(i).ID.ToString() }); newRow.Cells.Add(productTypeIdCell); TableCell productTypeNameCell = new TableCell(); productTypeNameCell.Controls.Add(new Label() { Text = productTypeList.ElementAt(i).Name }); newRow.Cells.Add(productTypeNameCell); } }
public static List <ProductType> getAllProductType() { return(ProductTypeRepo.GetProductType()); }