本文整理汇总了C#中Event.GetEventByEventId方法的典型用法代码示例。如果您正苦于以下问题:C# Event.GetEventByEventId方法的具体用法?C# Event.GetEventByEventId怎么用?C# Event.GetEventByEventId使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Event
的用法示例。
在下文中一共展示了Event.GetEventByEventId方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: MoreDetails
public ActionResult MoreDetails(int eventId)
{
using (var context = new StripeEntities())
{
Event getEventDetails = new Event(context);
var eventDetails = getEventDetails.GetEventByEventId(eventId)
.SingleOrDefault();
return View(eventDetails);
}
}
示例2: EditEvent
public ActionResult EditEvent(int eventId)
{
using (var context = new StripeEntities())
{
Event getEventDetails = new Event(context);
var eventDetails = getEventDetails.GetEventByEventId(eventId)
.SingleOrDefault();
ViewBag.SchoolList = SchoolClass.getSchoolList(context);
GetGameList getGameList = new GetGameList(context);
ViewBag.GameList = getGameList.getGameTypeList();
return View(eventDetails);
}
}
示例3: Apply
public ActionResult Apply(int eventId)
{
using (var context = new StripeEntities())
{
int refereeId = Convert.ToInt32(Session["loginid"]);
EventReferee eventReferee = new EventReferee(context);
if (eventReferee.CheckRefereeEligibilityForApplication(eventId, refereeId))
{
Event allEvents = new Event(context);
var eventDetails = allEvents.GetEventByEventId(eventId).SingleOrDefault();
GetGameList getRefList = new GetGameList(context);
ViewBag.RefereeList = getRefList.getRefTypeList(eventDetails.Sport_Name_spt_Sport_Name_ID);
return View(eventDetails);
}
else
{
ViewBag.ErrorMessage = "You've already applied for this event. Please wait for any further notification.";
return View("Error");
}
}
}