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);
         }
     }
 }
Exemple #2
0
        public override void BindControl()
        {
            RefineItemDAL dal = new RefineItemDAL();

            Utility.BindDataToRepeater(rpCADFile, dal.GetRefineItemByRefineId(RefineId));
        }