//dodaje kontrolki do edytowania po załadowaniu tabeli z comboboxa
        public static void AddEditControls(FlowLayoutPanel panel, string table)
        {
            panel.Controls.Clear();
            List <string> columnNames = Columns.ColumnNames(table);

            for (int i = 0; i < columnNames.Count; i++)
            {
                if (columnNames[i] == "Club")
                {
                    CustomComboBox club = new CustomComboBox();
                    club.Clubs();
                    panel.Controls.Add(club);
                }
                else if (columnNames[i] == "Position")
                {
                    CustomComboBox position = new CustomComboBox();
                    position.Position();
                    panel.Controls.Add(position);
                }
                else
                {
                    AttributeControlEdit attribute = new AttributeControlEdit();
                    attribute.AttributeName = columnNames[i];
                    panel.Controls.Add(attribute);
                }
            }
        }
        public static void AddEditableControls(int start_index, int[] RGB, FlowLayoutPanel panel, List <string> values, string table)
        {
            panel.Controls.Clear();
            List <string> columnNames = Columns.ColumnNames(table);

            // wypełnij tablicę pustymi stringami jeśli values jest puste
            if (!values.Any())
            {
                for (int i = 0; i < columnNames.Count; i++)
                {
                    values.Add("");
                }
            }

            for (int i = start_index; i < columnNames.Count; i++)
            {
                if (columnNames[i] == "Club")
                {
                    CustomComboBox club = new CustomComboBox();
                    club.Clubs();
                    club.BackColor       = Color.FromArgb(RGB[0], RGB[1], RGB[2]);
                    club.SetCurrentIndex = values[i];
                    panel.Controls.Add(club);
                }
                else if (columnNames[i] == "Position")
                {
                    CustomComboBox position = new CustomComboBox();
                    position.Position();
                    position.BackColor       = Color.FromArgb(RGB[0], RGB[1], RGB[2]);
                    position.SetCurrentIndex = values[i];
                    panel.Controls.Add(position);
                }
                else
                {
                    AttributeControlEdit attribute = new AttributeControlEdit();
                    attribute.BackColor      = Color.FromArgb(RGB[0], RGB[1], RGB[2]);
                    attribute.AttributeName  = columnNames[i];
                    attribute.AttributeValue = values[i];
                    panel.Controls.Add(attribute);
                }
            }
        }