コード例 #1
0
ファイル: BindingHelper.cs プロジェクト: romanu6891/fivemen
        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;
            }
        }
コード例 #2
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;
            }
        }