public ActionResult Index(Guid id) { Guid uid; if (Session["User"] != null) { uid = new Guid(Session["User"].ToString()); } else { return(Redirect(SiteConfig.SiteUrl + "/User/PostLogin")); } //显示活动详情 showAct(id); ViewData["TopActList"] = actService.GetTopActList(); ViewData["OrgList"] = orgService.ShowAllOrg(9, 1); showComment(id); if (joinService.IsExist(id, uid)) { ViewBag.Button = "您已参与"; } else { ViewBag.Button = "我想参加"; } return(View()); }
public ActionResult Search(int page) { int[] roleList = Session["RoleList"] as int[]; if (roleList == null || roleList.Except(new int[1] { 1 }).Count() != 0) { return(Redirect(SiteConfig.SiteUrl + "/Home/Index")); } ShowUser(); ViewBag.Count = orgService.GetOrgCount(); ViewData["OrgList"] = orgService.ShowAllOrg(10, page); return(View()); }
public ActionResult Index() { validUser(); //显示右边的东西 ViewData["TopActList"] = actService.GetTopActList(); ViewData["OrgList"] = orgService.ShowAllOrg(9, 1); //显示活动(标题、简介、社团组织logo) ViewData["ActList"] = actService.ShowIndexAct(8, 1); ViewData["TopActList"] = actService.GetTopActList(); ViewData["OrgList"] = orgService.ShowAllOrg(100, 1); return(View()); }