Exemple #1
0
        //Added items from clothes_--------------------------------------------------------------------------------------------------------------
        public void completeClothes(string table)
        {
            List <String> titles    = new List <String>();
            List <String> brand     = new List <String>();
            List <String> materials = new List <String>();
            List <String> sex       = new List <String>();
            List <int>    price     = new List <int>();
            List <int>    quantity  = new List <int>();

            workServerOnMainInterface.createInfoClothes(table, ref titles, ref brand, ref materials, ref sex, ref price, ref quantity);
            if (titles.Count == brand.Count && titles.Count == materials.Count && titles.Count == sex.Count && titles.Count == price.Count &&
                titles.Count == quantity.Count)
            {
                manageClothes = new ManageClothes();
                flowLayoutPanel.Controls.Clear();
                for (int i = 0; i < titles.Count; i++)
                {
                    string[] quantityCombo = new string[quantity[i] + 1];
                    for (int j = 0; j < quantityCombo.Length; j++)
                    {
                        quantityCombo[j] = (j).ToString();
                    }
                    manageClothes.createClothes(titles[i], brand[i], materials[i], sex[i], price[i], quantity[i], quantityCombo, basketItems, table);
                }
                for (int i = 0; i < manageClothes.getAllClothes().Count; i++)
                {
                    flowLayoutPanel.Controls.Add(manageClothes.getAllClothes()[i]);
                }
            }
        }