Ejemplo n.º 1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Session["AdminID"] == null)
     {
         Response.Redirect("Default.aspx");
     }
     gvItemsList.DataSource = items.GetItemByAllWithNoImg();
     gvItemsList.DataBind();
 }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            if (Session["AdminID"] == null)
            {
                Response.Redirect("Default.aspx");
            }

            gvItemsList.DataSource = items.GetItemByAllWithNoImg();
            gvItemsList.DataBind();

            ddlBrandID.DataSource     = brand.GetBrands();
            ddlBrandID.DataTextField  = "BrandName";
            ddlBrandID.DataValueField = "BID";
            ddlBrandID.DataBind();

            ddlProductID.DataSource     = products.GetProduct();
            ddlProductID.DataValueField = "PID";
            ddlProductID.DataTextField  = "Name";
            ddlProductID.DataBind();
        }
    }