Esempio n. 1
0
 private void BindPhotos()
 {
     if (ddlAlbumList2.Items.Count > 0)
     {
         DataTable dt = BINROTA.BUS.Members.PhotoAlbum.GetPhotos(this.MemberID, Convert.ToInt32(ddlAlbumList2.SelectedValue));
         if (dt.Rows.Count < 1)
         {
             dlMemberPhotos.Visible = false;
         }
         else
         {
             dlMemberPhotos.Visible = true;
         }
         UctrlPagings1.GeneratePager(ref dt, dlMemberPhotos, 6);
         //((Label)UctrlPagings1.FindControl("lblRecordCount")).Text = dt.Rows.Count.ToString();
         //dlMemberPhotos.DataSource = dt;
         //dlMemberPhotos.DataBind();
         foreach (DataListItem dlitem in dlMemberPhotos.Items)
         {
             ((Button)dlitem.FindControl("btnImageDelete")).Attributes.Add("onclick", "return confirm('Resmi silmek istediðinizden emin misiniz?');");
             ((Image)dlitem.FindControl("imgPhoto")).Attributes.Add("onerror", "this.src='Images/Design/NoPicture.jpg';");
         }
         ddlAlbumList2.Visible = true;
         lbAlbumTitle2.Text    = "Albüm Adý";
     }
     else
     {
         ddlAlbumList2.Visible = false;
         lbAlbumTitle2.Text    = "Albümünüz bulunamamýþtýr";
         //Response.Write("<script>document.getElementById('AddPhotoLink').style.display = 'none'</script>");
     }
     SetVisibles();
 }
Esempio n. 2
0
    private void FillPages()
    {
        DataTable dt = BINROTA.BUS.Pages.GetUserPages(this.MemberID, (int)Enumerations.PageType.TravelPage);

        if (dt.Rows.Count < 1)
        {
            trPages.Visible = true;
        }

        UctrlPagings1.GeneratePager(ref dt, rptPages);


        foreach (RepeaterItem rptitem in rptPages.Items)
        {
            ((ImageButton)rptitem.FindControl("btnPageDelete")).Attributes.Add("onclick", "return confirm('Yazýyý silmek istediðinizden emin misiniz?');");
        }
    }