Пример #1
0
        public void SaveScoreCardDetails(AdminEL admindetails)
        {
            try
            {
                // trn_ScoreCardDetails objSCDetails = new trn_ScoreCardDetails();
                var result     = objPlay11DB.trn_ScoreCardDetails;
                var playerData = result.Where(t => t.PlayerId == admindetails.objScoreCardDetailsEL.PlayerId).ToList();
                foreach (var data in playerData)
                {
                    data.MatchId         = admindetails.objScoreCardDetailsEL.MatchId;
                    data.PlayerId        = admindetails.objScoreCardDetailsEL.PlayerId;
                    data.RunsScored      = admindetails.objScoreCardDetailsEL.RunsScored;
                    data.FourCount       = admindetails.objScoreCardDetailsEL.FourCount;
                    data.SixCount        = admindetails.objScoreCardDetailsEL.SixCount;
                    data.RunOutorCatches = admindetails.objScoreCardDetailsEL.RunOutorCatches;
                    data.WicketsTaken    = admindetails.objScoreCardDetailsEL.WicketsTaken;
                    data.MaidenOvers     = admindetails.objScoreCardDetailsEL.MaidenOvers;
                }

                //   objPlay11DB.trn_ScoreCardDetails.Add(objSCDetails);
                var res = objPlay11DB.SaveChanges();
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Пример #2
0
 public void SaveScoreCardDetails(AdminEL admindetails)
 {
     try
     {
         objAdminDB.SaveScoreCardDetails(admindetails);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Пример #3
0
        public void SavePlayerDetails(AdminEL admindetails)
        {
            try
            {
                ref_PlayerDetails objPlayerDetails = new ref_PlayerDetails();

                objPlayerDetails.PlayerName   = admindetails.objPlayerDetailsEL.PlayerName;
                objPlayerDetails.PlayerRoleId = admindetails.objPlayerDetailsEL.PlayerRoleId;
                objPlayerDetails.Points       = admindetails.objPlayerDetailsEL.PlayerPoints;
                objPlayerDetails.TeamId       = admindetails.objPlayerDetailsEL.PlayerTeamId;
                objPlay11DB.ref_PlayerDetails.Add(objPlayerDetails);
                var res = objPlay11DB.SaveChanges();
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Пример #4
0
        public void SaveMatchDetails(AdminEL admindetails)
        {
            try
            {
                ref_MatchDetails objMatDetails = new ref_MatchDetails();

                objMatDetails.Venue       = admindetails.objMatchDetailsEL.Venue;
                objMatDetails.FirstTeam   = admindetails.objMatchDetailsEL.FirstTeam;
                objMatDetails.SecondTeam  = admindetails.objMatchDetailsEL.SecondTeam;
                objMatDetails.MatchDate   = admindetails.objMatchDetailsEL.MatchDate;
                objMatDetails.MatchTime   = admindetails.objMatchDetailsEL.MatchTime;
                objMatDetails.IsCompleted = 0;
                objPlay11DB.ref_MatchDetails.Add(objMatDetails);
                var res = objPlay11DB.SaveChanges();
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Пример #5
0
 public ActionResult SaveScoreCardDetails(AdminEL admindetails)
 {
     objAdminBL.SaveScoreCardDetails(admindetails);
     return(RedirectToAction("Index"));
 }