Esempio n. 1
0
        protected void createProdTable()
        {
            //newClientDiv.Style.Add("display", "none");
                //allClientDiv.Style.Add("display", "none");
                Table table1 = new Table();
                table1 = allProductTable;
                List<Bicycles> BicyclesList = new List<Bicycles>();
                BicycleBL bike = new BicycleBL();
                CategoryBL category = new CategoryBL();
                SubCategoryBL subCategory = new SubCategoryBL();
                ProducerBL producer = new ProducerBL();
                ColorBL color = new ColorBL();
                SizeBL size = new SizeBL();
                BicyclesList = bike.getAllBike();
                for (int i = 0; i < BicyclesList.Count; i++)
                {
                    TableRow dr = new TableRow();
                    TableCell cell = new TableCell();
                    //שם יצרן
                    cell.Text = producer.GetProducer(BicyclesList[i]._Name).ToString();
                    dr.Cells.Add(cell);
                    //cell = new TableCell();
                    //cell.Text = "דגם";
                    //dr.Cells.Add(cell);
                    //קטגוריה ראשית
                    cell = new TableCell();
                    cell.Text = category.getCategoryById(BicyclesList[i]._MainCategoryId).ToString();
                    dr.Cells.Add(cell);
                    //קטגוריה משנית
                    cell = new TableCell();
                    cell.Text = subCategory.GetSubCategory(BicyclesList[i]._SubCategoryId).ToString();
                    dr.Cells.Add(cell);
                    //מידה
                    cell = new TableCell();
                    cell.Text = size.getSize(BicyclesList[i]._size).ToString();
                    dr.Cells.Add(cell);
                    //צבע
                    cell = new TableCell();
                    cell.Text = color.getColorById(BicyclesList[i]._colorId).ToString();
                    dr.Cells.Add(cell);
                    //כמות
                    cell = new TableCell();
                    cell.Text = BicyclesList[i]._Quantity.ToString();
                    dr.Cells.Add(cell);
                    //מחיר
                    cell = new TableCell();
                    cell.Text = BicyclesList[i]._RegularPrice.ToString();
                    dr.Cells.Add(cell);

                    table1.Rows.Add(dr);

            }
        }