protected void fmvLE_DataBound(object sender, EventArgs e) { if (e == null) { throw new ArgumentNullException("e"); } FormView fv = sender as FormView; LogbookEntryDisplay le = (LogbookEntryDisplay)fv.DataItem; Controls_mfbImageList mfbilFlight = (Controls_mfbImageList)fv.FindControl("mfbilFlight"); mfbilFlight.Key = le.FlightID.ToString(CultureInfo.InvariantCulture); mfbilFlight.Refresh(); mfbGoogleMapManager1.Map.Images = mfbilFlight.Images.ImageArray; Controls_mfbVideoEntry ve = (Controls_mfbVideoEntry)fv.FindControl("mfbVideoEntry1"); ve.Videos.Clear(); foreach (VideoRef vr in le.Videos) { ve.Videos.Add(vr); } Controls_mfbAirportServices aptSvc = (Controls_mfbAirportServices)fv.FindControl("mfbAirportServices1"); aptSvc.GoogleMapID = mfbGoogleMapManager1.MapID; aptSvc.SetAirports(RoutesList.MasterList.GetNormalizedAirports()); ((Controls_mfbSignature)fv.FindControl("mfbSignature")).Flight = le; }
protected void fmvLE_DataBound(object sender, EventArgs e) { if (e == null) { throw new ArgumentNullException("e"); } FormView fv = sender as FormView; LogbookEntryDisplay le = (LogbookEntryDisplay)fv.DataItem; Controls_mfbImageList mfbilFlight = (Controls_mfbImageList)fv.FindControl("mfbilFlight"); mfbilFlight.Key = le.FlightID.ToString(CultureInfo.InvariantCulture); mfbilFlight.Refresh(); mfbGoogleMapManager1.Map.Images = mfbilFlight.Images.ImageArray; Controls_mfbVideoEntry ve = (Controls_mfbVideoEntry)fv.FindControl("mfbVideoEntry1"); ve.Videos.Clear(); foreach (VideoRef vr in le.Videos) { ve.Videos.Add(vr); } Controls_mfbAirportServices aptSvc = (Controls_mfbAirportServices)fv.FindControl("mfbAirportServices1"); aptSvc.GoogleMapID = mfbGoogleMapManager1.MapID; aptSvc.AddZoomLink = (mfbGoogleMapManager1.Mode == MyFlightbook.Mapping.GMap_Mode.Dynamic); aptSvc.SetAirports(RoutesList.MasterList.GetNormalizedAirports()); ((Controls_mfbSignature)fv.FindControl("mfbSignature")).Flight = le; IEnumerable <Badge> cached = Viewer.CachedBadges; List <Badge> badges = (cached == null ? null : new List <Badge>(cached)); if (badges != null) { Repeater rptBadges = (Repeater)fv.FindControl("rptBadges"); rptBadges.DataSource = BadgeSet.BadgeSetsFromBadges(badges.FindAll(b => b.IDFlightEarned == le.FlightID)); rptBadges.DataBind(); } }