protected void rpRefinement_ItemDataBound(object sender, RepeaterItemEventArgs e) { if (e.Item.ItemType == ListItemType.AlternatingItem || e.Item.ItemType == ListItemType.Item) { Refine refine = e.Item.DataItem as Refine; RefineItemDAL dal = new RefineItemDAL(); var refineItem = dal.GetRefineItemByRefineId(refine.Refine_Id).OrderByDescending(i => i.RefineItemDate).FirstOrDefault(); if (refineItem != null) { HyperLink lnkLatestFile = e.Item.FindControl("lnkLatestFile") as HyperLink; lnkLatestFile.Text = refineItem.RefineFileName; lnkLatestFile.NavigateUrl = Page.ResolveUrl(refineItem.RefineFilePath); } } }
public override void BindControl() { RefineItemDAL dal = new RefineItemDAL(); Utility.BindDataToRepeater(rpCADFile, dal.GetRefineItemByRefineId(RefineId)); }