protected void InitByEventID(string id) { AMSEvent eventData = AMSEventSqlAdapter.Instance.LoadByID(id); eventData.NullCheck(string.Format("不能找到ID为{0}的事件", id)); this.Data = eventData; }
protected void InitByEventID(string id, string channelID) { AMSEvent eventData = AMSEventSqlAdapter.Instance.Load(id, channelID); eventData.NullCheck(string.Format("不能找到ID为{0}的事件", id)); if (eventData.PosterUrl.IsNullOrEmpty()) { eventData.PosterUrl = UriHelper.MakeAbsolute(new Uri(this.ResolveUrl("~/images/amsPoster1.png"), UriKind.RelativeOrAbsolute), this.Request.Url).ToString(); } this.Data = eventData; }