Exemplo n.º 1
0
 /// <summary>
 /// Format Game Situation With Inning and bottom top.
 /// </summary>
 /// <param name="gameInfo">Game info</param>
 /// <returns>String with game status.</returns>
 public static string FormatGameSituationWithInning(GameInfoViewModel gameInfo)
 {
     string result = string.Empty;
     if (string.IsNullOrEmpty(gameInfo.GameSituationID))
     {
         if (gameInfo.Inning == 0 || gameInfo.Inning == null)
         {
             result = "開始";
         }
         else if (gameInfo.Inning >= 1)
         {
             result = gameInfo.Inning + Constants.STRING_ROUND + gameInfo.BottomTop;
         }
     }
     else if (gameInfo.GameSituationID == "2")
     {
         result = "終了";
     }
     else if (gameInfo.GameSituationID == "4" || gameInfo.GameSituationID == "5" || gameInfo.GameSituationID == "A" ||
         gameInfo.GameSituationID == "B" || gameInfo.GameSituationID == "C")
     {
         result = "コールド";
     }
     else if (gameInfo.GameSituationID == "8")
     {
         result = "没収試合";
     }
     else
     {
         result = "試合中止";
     }
     return result;
 }
Exemplo n.º 2
0
        public ActionResult EditPointInMobile(string sportID, int? gameID, string expectTargetID, int betSelectID, string memberID, int teamID, string reloadurl, string reloadarea)
        {
            if (gameID != null)
            {
                var spID = Convert.ToInt32(sportID);
                ViewBag.SportID = spID;
                int mID = Convert.ToInt32(memberID);
                var query = default(ExpectationInfoModel);
                //Decrypt text
                long lgExtTarget = Convert.ToInt64(expectTargetID);
                //Get expect point
                query = (from et in com.ExpectTarget
                         join ep in com.ExpectPoint on et.ExpectTargetID equals ep.ExpectTargetID
                         where et.ExpectTargetID == lgExtTarget
                            && et.UniqueID == gameID
                            && ep.CreatedAccountID == memberID
                            && ep.BetSelectID == betSelectID
                            && ep.UniqueID == teamID
                         select new ExpectationInfoModel
                         {
                             PointID = ep.PointID,
                             ExpectPointID = (ep.ExpectPointID == null ? 0 : ep.ExpectPointID),
                             ExpectPoint = (ep.ExpectPoint1 == null ? 0 : ep.ExpectPoint1),
                             BetSelectID = (ep.BetSelectID.Value == null ? 0 : ep.BetSelectID.Value),
                             GameID = (et.UniqueID == null ? 0 : et.UniqueID),
                             Odds = (from od in com.OddsInfo
                                     join bsm in com.BetSelectMaster on od.BetSelectMasterID equals bsm.BetSelectMasterID
                                     where ep.BetSelectID == bsm.BetSelectID
                                         && et.SportsID == spID
                                         && et.SportsID == od.SportID
                                         && od.ExpectTargetID == et.ExpectTargetID
                                     select od.Odds).FirstOrDefault(),
                         }).FirstOrDefault();

                query.ReloadUrl = reloadurl;
                query.ReloadArea = reloadarea;

                var gameInfo = new GameInfoViewModel();
                gameInfo = NpbCommon.GetGameInfoByGameID(Constants.JLG_SPORT_ID, (int)gameID);

                if (gameID != null)
                {
                    gameInfo.ExpectationInfo = query;
                }

                return PartialView("_JlgPointEdit", gameInfo);
            }
            else
            {
                return PartialView("_JlgPointEdit");
            }
        }