Exemplo n.º 1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            WeatherPredictionEntities entity = new WeatherPredictionEntities();
            var crops = (from ob in entity.Crops select new { Name = ob.Crop_Name_Eng, Description = ob.Description, ImageUrl = ob.ImageURL }).ToList();

            var gallery = (from ob in crops select new { ob.Name, ob.Description, ImageUrl = ob.ImageUrl.Replace("~", "..") }).ToList();
            Repeater_Gallery.DataSource = gallery;
            Repeater_Gallery.DataBind();
        }
    }
Exemplo n.º 2
0
 /// <summary>
 /// 编辑状态下相册输出
 /// </summary>
 /// <param name="Rid"></param>
 public void GalleryBind(int Rid)
 {
     Repeater_Gallery.DataSource = GalleryBll.GetList(80, "Rid=" + Rid, " TIME");
     Repeater_Gallery.DataBind();
 }