using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
public partial class gallery : System.Web.UI.Page
{
    Products local_product = new Products();
    protected void Page_Load(object sender, EventArgs e)
    {
        BindProductList1();
        BindProductList2();
        BindProductList3();
    }

    private void BindProductList1()
    {
        DataTable dt = new DataTable();
        try
        {
            dt = local_product.getProductDetailsForGallery1();
            if (dt.Rows.Count > 0)
            {
                rpProductList1.DataSource = dt;
                rpProductList1.DataBind();
            }
            else
            {
                lblMessage.Text = "<br/><br/><br/>There Is No Product Found.";
                lblMessage.Font.Size = 20;
            }
        }

        catch (Exception ex)
        {
            throw new Exception(ex.Message);
        }
    }

    private void BindProductList2()
    {
        DataTable dt = new DataTable();
        try
        {
            dt = local_product.getProductDetailsForGallery2();
            if (dt.Rows.Count > 0)
            {
                rpProductList2.DataSource = dt;
                rpProductList2.DataBind();
            }
            else
            {
                lblMessage.Text = "<br/><br/><br/>There Is No Product Found.";
                lblMessage.Font.Size = 20;
            }
        }

        catch (Exception ex)
        {
            throw new Exception(ex.Message);
        }
    }
    private void BindProductList3()
    {
        DataTable dt = new DataTable();
        try
        {
            dt = local_product.getProductDetailsForGallery3();
            if (dt.Rows.Count > 0)
            {
                rpProductList3.DataSource = dt;
                rpProductList3.DataBind();
            }
            else
            {
                lblMessage.Text = "<br/><br/><br/>There Is No Product Found.";
                lblMessage.Font.Size = 20;
            }
        }

        catch (Exception ex)
        {
            throw new Exception(ex.Message);
        }
    }

}