public static void BindCoach(ComboBox cb, bool search) { cb.DropDownStyle = ComboBoxStyle.DropDownList; ArrayList lists = FT.DAL.Orm.SimpleOrmOperator.QueryListAll(typeof(Coach)); if (search) { Coach coach = new Coach(); coach.Name = "--��ѡ��--"; coach.Id = -1; lists.Add(coach); } if (lists.Count > 0) { //this.cbGroup cb.DataSource = lists; cb.DisplayMember = "����"; cb.ValueMember = "���"; cb.SelectedIndex = 0; } }
public static void BindCoach(ComboBox cb, bool search) { cb.DropDownStyle = ComboBoxStyle.DropDownList; ArrayList lists = FT.DAL.Orm.SimpleOrmOperator.QueryListAll(typeof(Coach)); if (search) { Coach coach = new Coach(); coach.Name = "--ÇëÑ¡Ôñ--"; coach.Id = -1; lists.Add(coach); } if (lists.Count > 0) { //this.cbGroup cb.DataSource = lists; cb.DisplayMember = "ÐÕÃû"; cb.ValueMember = "±àºÅ"; cb.SelectedIndex = 0; } }