Пример #1
0
 public void Delete(int playerId)
 {
     object[] parameterValues =
     {
         new SqlParameter("@p_id", playerId)
     };
     SqlHelper.ExecuteScalar(DaLplayer.ConnectionString(), "p_DeleplayerById", parameterValues);
 }
Пример #2
0
 public Player SelectById(int playerId)
 {
     object[] parameterValues =
     {
         new SqlParameter("@PlayerID", playerId)
     };
     return(InnerSelect(SqlHelper.ExecuteDataset(DaLplayer.ConnectionString(), "[ByPlayerId]", parameterValues)));
 }
Пример #3
0
 public IList <Results> SelectAllResultsAsList(int playerId)
 {
     object[] parameterValues =
     {
         new SqlParameter("@PlayerID", playerId)
     };
     return(MultipleInnerSelect(SqlHelper.ExecuteDataset(DaLplayer.ConnectionString(), "[_p_selectAllResultsByJoint]", parameterValues)));
 }
Пример #4
0
 public void Update(Results result)
 {
     object[] parameterValues =
     {
         new SqlParameter("@p_id",              result._id),
         new SqlParameter("@HostBallsLeft",     result.HosBallsLeft),
         new SqlParameter("@OpponentBallsLeft", result.OppnetBallsLeft)
     };
     SqlHelper.ExecuteScalar(DaLplayer.ConnectionString(), "p_updateResults", parameterValues);
 }
Пример #5
0
 public void Save(Player player)
 {
     object[] parameterValues =
     {
         new SqlParameter("@PlayerFirstName", player.FirstName),
         new SqlParameter("@PlayerLatName",   player.LastName),
         new SqlParameter("@Age",             player.Age),
         new SqlParameter("@Email",           player.EmailAddress),
     };
     SqlHelper.ExecuteScalar(DaLplayer.ConnectionString(), "[SavePlayer]", parameterValues);
 }
Пример #6
0
        public void Save(Results results)
        {
            object[] parameterValues =
            {
                new SqlParameter("@MatchDate",         results.Date),
                new SqlParameter("@HostId",            results.HostId),
                new SqlParameter("@OpponentId",        results.OppenentId),
                new SqlParameter("@HostBallsLeft ",    results.HosBallsLeft),
                new SqlParameter("@OpponentBallsLeft", results.OppnetBallsLeft),
                new SqlParameter("@HostStatus",        results.HostStatus),
                new SqlParameter("@OppentStatus",      results.OppnentStatus)
            };



            SqlHelper.ExecuteScalar(DaLplayer.ConnectionString(), "[SaveResults]", parameterValues);
        }
Пример #7
0
 public void Update(Player player)
 {
     object[] parameterValues =
     {
         new SqlParameter("@p_id",         player.Id),
         new SqlParameter("@FirstName",    player.FirstName),
         new SqlParameter("@LastName",     player.LastName),
         new SqlParameter("@Age",          player.Age),
         new SqlParameter("@EmailAddress", player.EmailAddress),
         new SqlParameter("@Point",        player.Point),
         new SqlParameter("@Wins",         player.Wins),
         new SqlParameter("@Loss",         player.Loss),
         new SqlParameter("@AwayGames",    player.AwayGames),
         new SqlParameter("@HomeGames",    player.HomeGames),
         new SqlParameter("@Total",        player.Total),
         new SqlParameter("@BF",           player.TotalBallsScored),
         new SqlParameter("@BA",           player.TotalBallsScoredAgainst),
         new SqlParameter("@BD",           player.BallDefference),
     };
     SqlHelper.ExecuteScalar(DaLplayer.ConnectionString(), "p_updatePlayer", parameterValues);
 }
Пример #8
0
 public IList <Player> SelectAllAsList()
 {
     return(MultipleInnerSelect(SqlHelper.ExecuteDataset(DaLplayer.ConnectionString(), "[p_SelectPlayers_All]")));
 }
Пример #9
0
 public IList <Results> SelectAllAsList()
 {
     return(MultipleInnerSelect(SqlHelper.ExecuteDataset(DaLplayer.ConnectionString(), "[_p_selectAllResults]")));
 }