Пример #1
0
    private void FillAlbumName()
    {
        try
        {
            tbl_AlbumMasterProp Objtbl_AlbumMasterProp = new tbl_AlbumMasterProp();
            Objtbl_AlbumMasterProp.AlbumCode = 0;

            tbl_AlbumMasterBAL Objtbl_AlbumMasterBAL = new tbl_AlbumMasterBAL();
            DataSet            dsData = Objtbl_AlbumMasterBAL.SelectCombo_Data();

            DataRow drNew = dsData.Tables[0].NewRow();
            drNew["AlbumName"] = "--- Select Any ---";
            drNew["AlbumCode"] = 0;

            dsData.Tables[0].Rows.InsertAt(drNew, 0);

            ddlAlbumName.DataSource     = dsData.Tables[0];
            ddlAlbumName.DataTextField  = "AlbumName";
            ddlAlbumName.DataValueField = "AlbumCode";
            ddlAlbumName.DataBind();
        }
        catch (Exception ex)
        {
            throw ex;
        }
    }
    private void FillAlbumList()
    {
        try
        {
            tbl_AlbumMasterBAL Objtbl_AlbumMasterBAL = new tbl_AlbumMasterBAL();
            DataSet            dsData = Objtbl_AlbumMasterBAL.SelectCombo_Data();
            rptPhotoAlbum.DataSource = dsData.Tables[0];
            rptPhotoAlbum.DataBind();

            if (dsData.Tables[0].Rows.Count > 0)
            {
                FillAlbumImages(Convert.ToInt32(dsData.Tables[0].Rows[0]["AlbumCode"]));
            }
        }
        catch
        {
        }
    }