/// <summary> /// 推荐名称 /// </summary> /// <param name="recommend"></param> /// <returns></returns> protected string GetMatchStatusName(int matchID) { MatchPublic item = FacadeManage.aideGameMatchFacade.GetMatchPublicInfo(matchID); string rValue = ""; if (item != null) { switch (item.MatchStatus) { case 0: rValue = "<span class='hong'>未开始</span>"; break; case 2: rValue = "<span class='lan'>进行中</span>"; break; case 8: rValue = "<span class='green'>已结束</span>"; break; default: rValue = "<span>未知</span>"; break; } } else { rValue = "<span>未知</span>"; } return(rValue); }
/// <summary> /// 绑定比赛信息 /// </summary> protected void BindMatchInfo() { if (IntParam <= 0) { return; } MatchInfo matchInfo = FacadeManage.aideGameMatchFacade.GetMatchInfo(IntParam); MatchPublic matchPublic = FacadeManage.aideGameMatchFacade.GetMatchPublicInfo(IntParam); // 绑定基础配置 if (matchPublic != null) { lblMatchName.Text = matchPublic.MatchName; lblMatchTypeName.Text = GetMatchTypeName(matchPublic.MatchType); lblMatchStatusName.Text = GetMatchStatusName(matchPublic.MatchStatus); lblKindName.Text = GetGameKindName(matchPublic.KindID); } // 绑定网站展示 if (matchInfo != null) { lblMatchDate.Text = matchInfo.MatchDate; txtMatchSummary.Text = matchInfo.MatchSummary; upSmallImage.FilePath = matchInfo.MatchImage; txtSortID.Text = matchInfo.SortID.ToString(); CtrlHelper.SetText(txtContent, matchInfo.MatchContent); } }
/// <summary> /// 获取比赛配置实体 /// </summary> /// <param name="matchID"></param> /// <returns></returns> public MatchPublic GetMatchPublicInfo(int matchID) { string sqlQuery = string.Format("(NOLOCK) WHERE MatchID= {0}", matchID); MatchPublic item = aideMatchPublicProvider.GetObject <MatchPublic>(sqlQuery); return(item); }
public ActionResult MatchConfigInfo() { string text = TypeUtil.ObjectToString(base.Request["cmd"]); int num = TypeUtil.ObjectToInt(base.Request["param"]); base.ViewBag.OP = text; base.ViewBag.ID = num; string text2 = ""; string empty = string.Empty; empty += "<div class=\"ui-reward-item\">"; empty += "第<span class=\"ui-item-serial\">{0}</span>名:"; empty += "金币:<input type=\"text\" class=\"text wd2\" name=\"gold\" value=\"{1}\" readonly> "; empty += "</div>"; DataSet matchRewardList = FacadeManage.aideGameMatchFacade.GetMatchRewardList(num); if (matchRewardList.Tables[0].Rows.Count > 0) { text2 = string.Empty; for (int i = 0; i < matchRewardList.Tables[0].Rows.Count; i++) { DataRow dataRow = matchRewardList.Tables[0].Rows[i]; text2 += string.Format(empty, i + 1, dataRow["RewardGold"], dataRow["RewardIngot"], dataRow["RewardExperience"]); } } base.ViewBag.strReward = text2; base.ViewBag.MatchName = ""; base.ViewBag.MatchTypeName = ""; base.ViewBag.MatchStatusName = ""; base.ViewBag.KindName = ""; base.ViewBag.MatchSummary = ""; base.ViewBag.MatchDate = ""; base.ViewBag.SortID = "0"; base.ViewBag.MatchImage = ""; base.ViewBag.Content = ""; MatchInfo matchInfo = FacadeManage.aideGameMatchFacade.GetMatchInfo(num); if (matchInfo != null) { base.ViewBag.MatchSummary = matchInfo.MatchSummary; base.ViewBag.MatchDate = matchInfo.MatchDate; base.ViewBag.SortID = matchInfo.SortID.ToString(); base.ViewBag.MatchImage = matchInfo.MatchImage; base.ViewBag.Content = matchInfo.MatchContent; } MatchPublic matchPublicInfo = FacadeManage.aideGameMatchFacade.GetMatchPublicInfo(num); if (matchPublicInfo != null) { base.ViewBag.MatchName = matchPublicInfo.MatchName; base.ViewBag.MatchTypeName = ((matchPublicInfo.MatchType == 0) ? "定时赛" : ((matchPublicInfo.MatchType == 1) ? "即时赛" : "未知")); base.ViewBag.MatchStatusName = ((matchPublicInfo.MatchStatus == 0) ? "<span style='color:red;'>未开始</span>" : ((matchPublicInfo.MatchStatus == 2) ? "<span style='color:blue;'>进行中</span>" : ((matchPublicInfo.MatchStatus == 8) ? "<span style='color:green;'>已结束</span>" : "未知"))); base.ViewBag.KindName = TypeUtil.GetGameKindName(matchPublicInfo.KindID); } base.ViewData["MatchInfo"] = matchInfo; base.ViewData["MatchPublic"] = matchPublicInfo; return(View()); }
public static string GetMatchTypeName(int matchID) { MatchPublic matchPublicInfo = FacadeManage.aideGameMatchFacade.GetMatchPublicInfo(matchID); if (matchPublicInfo == null) { return("未知"); } if (matchPublicInfo.MatchType == 0) { return("定时赛"); } if (matchPublicInfo.MatchType == 1) { return("即时赛"); } return("未知"); }
public static string GetMatchStatusName(int matchID) { MatchPublic matchPublicInfo = FacadeManage.aideGameMatchFacade.GetMatchPublicInfo(matchID); string result; if (matchPublicInfo != null) { byte matchStatus = matchPublicInfo.MatchStatus; switch (matchStatus) { case 0: result = "<span style='color:red;' >未开始</span>"; return(result); case 1: break; case 2: result = "<span style='color:blue;'>进行中</span>"; return(result); default: if (matchStatus == 8) { result = "<span style='color:green;'>已结束</span>"; return(result); } break; } result = "<span>未知</span>"; } else { result = "<span>未知</span>"; } return(result); }
/// <summary> /// 获取游戏属性 /// </summary> /// <param name="joinID"></param> /// <returns></returns> protected string GetMatchTypeName(int matchID) { MatchPublic item = FacadeManage.aideGameMatchFacade.GetMatchPublicInfo(matchID); if (item != null) { if (item.MatchType == 0) { return("定时赛"); } else if (item.MatchType == 1) { return("即时赛"); } else { return("未知"); } } else { return("未知"); } }
public static string GetMatchStatusName(int matchID) { MatchPublic matchPublicInfo = FacadeManage.aideGameMatchFacade.GetMatchPublicInfo(matchID); string text = ""; if (matchPublicInfo != null) { switch (matchPublicInfo.MatchStatus) { case 0: return("<span style='color:red;' >未开始</span>"); case 2: return("<span style='color:blue;'>进行中</span>"); case 8: return("<span style='color:green;'>已结束</span>"); default: return("<span>未知</span>"); } } return("<span>未知</span>"); }