示例#1
0
 /// <summary>
 /// 
 /// </summary>
 /// <returns></returns>
 public ActionResult JTop()
 {
     int jType = JlgCommon.GetJlgType(Request.Url.AbsoluteUri);
     ViewBag.JType = jType;
     JlgTopViewModel topViewModel = new JlgTopViewModel();
     int gameKind = JlgConstants.JLG_GAMEKIND_J1;
     ViewBag.JleagueSubMenu = 1;
     ViewBag.JleagueMenu = 2;
     if(jType == 2)
     {
         ViewBag.JleagueMenu = 3;
         gameKind = JlgConstants.JLG_GAMEKIND_J2;
     }
     topViewModel.JlgGameKind = gameKind;
     topViewModel.TopMostViewNews = GetJlgNewTopViewsInLeague(Constants.LEAGUE_TOPIC_CLASSIFICATION, gameKind);
     topViewModel.TopRecentNews = GetJlgNewTopViewsInLeague(Constants.LEAGUE_TOPIC_CLASSIFICATION, gameKind, false);
     topViewModel.TopExpectationsDeviation = GetTeamExpectedRanking(1, Constants.LEAGUE_TOPIC_CLASSIFICATION, gameKind);
     topViewModel.TopBetrayalDeviation = GetTeamExpectedRanking(2, Constants.LEAGUE_TOPIC_CLASSIFICATION, gameKind);
     topViewModel.TopRecentPost = PostedController.GetRecentPosts(3, JlgConstants.JLG_SPORT_ID, Constants.LEAGUE_TOPIC_CLASSIFICATION, gameKind);
     DateTime dateNow = DateTime.Now;
     int year = dateNow.Year;
     int month = dateNow.Month;
     int day = dateNow.Day;
     int inputDate = year * 10000 + month * 100 + day;
     int gameDate = GetGameDate(inputDate, gameKind, JlgConstants.JLG_DATETYPE_NEXT);
     if (gameDate == 0)
     {
         gameDate = inputDate;
     }
     topViewModel.JlgGameDate = gameDate;
     topViewModel.JlgDispGameDate = DateTime.ParseExact(gameDate.ToString(), "yyyyMMdd", null);
     topViewModel.JlgFirstGameDate = GetFirstGameDate(gameKind);
     topViewModel.JlgLastGameDate = GetLastGameDate(gameKind);
     return View(topViewModel);
 }
示例#2
0
 /// <summary>
 /// 
 /// </summary>
 /// <returns></returns>
 public ActionResult NabiscoTop()
 {
     ViewBag.JleagueMenu = 4;
     ViewBag.JleagueSubMenu = 1;
     int jType = JlgCommon.GetJlgType(Request.Url.AbsoluteUri);
     ViewBag.JType = jType;
     JlgTopViewModel topViewModel = new JlgTopViewModel();
     topViewModel.JlgGameKind = JlgConstants.JLG_GAMEKIND_NABISCO;
     topViewModel.TopRecentPost = PostedController.GetRecentPosts(3, JlgConstants.JLG_SPORT_ID, Constants.LEAGUE_TOPIC_CLASSIFICATION, JlgConstants.JLG_GAMEKIND_NABISCO);
     DateTime dateNow = DateTime.Now;
     int year = dateNow.Year;
     int month = dateNow.Month;
     int day = dateNow.Day;
     int inputDate = year * 10000 + month * 100 + day;
     int gameDate = GetGameDate(inputDate, JlgConstants.JLG_GAMEKIND_NABISCO, JlgConstants.JLG_DATETYPE_NEXT);
     if (gameDate == 0)
     {
         gameDate = inputDate;
     }
     topViewModel.JlgGameDate = gameDate;
     topViewModel.JlgDispGameDate = DateTime.ParseExact(gameDate.ToString(), "yyyyMMdd", null);
     topViewModel.JlgFirstGameDate = GetFirstGameDate(JlgConstants.JLG_GAMEKIND_NABISCO);
     topViewModel.JlgLastGameDate = GetLastGameDate(JlgConstants.JLG_GAMEKIND_NABISCO);
     return View(topViewModel);
 }
示例#3
0
 /// <returns></returns>
 public ActionResult Index()
 {
     ViewBag.JleagueMenu = 1;
     JlgTopViewModel topViewModel = new JlgTopViewModel();
     topViewModel.TopMostViewNews = GetJlgNewTopViews();
     topViewModel.TopRecentNews = GetJlgNewTopViews(false);
     topViewModel.TopRecentPost = PostedController.GetRecentPosts(0, JlgConstants.JLG_SPORT_ID, null, null);
     topViewModel.TopExpectationsDeviation = GetTeamExpectedRanking(1);
     topViewModel.TopBetrayalDeviation = GetTeamExpectedRanking(2);
     DateTime dateNow = DateTime.Now;
     int year = dateNow.Year;
     int month = dateNow.Month;
     int day = dateNow.Day;
     int inputDate = year * 10000 + month * 100 + day;
     int gameDate = GetGameDate(inputDate, 0, JlgConstants.JLG_DATETYPE_NEXT);
     if (gameDate == 0)
     {
         gameDate = inputDate;
     }
     topViewModel.JlgGameDate = gameDate;
     topViewModel.JlgDispGameDate = DateTime.ParseExact(gameDate.ToString(), "yyyyMMdd", null);
     topViewModel.JlgFirstGameDate = GetFirstGameDate(0);
     topViewModel.JlgLastGameDate = GetLastGameDate(0);
     return View(topViewModel);
 }