Ejemplo n.º 1
0
        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);
            }
        }
Ejemplo n.º 2
0
 public static List <ProductType> getAllProductType()
 {
     return(ProductTypeRepo.GetProductType());
 }