示例#1
0
文件: PlayerTest.cs 项目: rsalit/CSBC
        public void GetSponsorPlayersTest()
        {
            var context = new CSBC.Core.Data.CSBCDbContext();
            var rep = new PlayerRepository(context);
            var players = rep.GetSponsorPlayers(7478, 23893);       //test value

            Assert.IsTrue(players.Any<SeasonPlayer>() );
        }
示例#2
0
        private void GetKids(int sponsorId)
        {
            var rep = new PlayerRepository(new CSBCDbContext());
            var players = rep.GetSponsorPlayers(Master.SeasonId, Master.SponsorId);
            try
            {

                var grid = grdKids;
                grid.DataSource = players;
                grid.DataBind();

                /*grdKids.Columns.Add("Remove", "");
                var _with4 = grdKids.DisplayLayout.Bands(0).Columns;
                _with4.FromKey("PeopleID").Hidden = true;
                _with4.FromKey("PlayerID").Hidden = true;
                _with4.FromKey("Name").Width = 130;
                _with4.FromKey("Remove").Width = 80;
                _with4.FromKey("Remove").NullText = "Remove";
                _with4.FromKey("Remove").Type = Infragistics.WebUI.UltraWebGrid.ColumnType.Button;
                _with4.FromKey("Remove").CellStyle.HorizontalAlign = HorizontalAlign.Center;
                 */

            }
            catch (Exception ex)
            {
                lblError.Text = "GetKids::" + ex.Message;
            }
        }