Example #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            BindSideLink();

            if (!IsPostBack)
            {
                lblErrMsg.Visible = false;

                string aisleTopID = String.Empty;
                aisleTopID = Request.QueryString["AT"].ToString();

                string aisleTopName = String.Empty;
                aisleTopName = objBAL.GetAisleTop(aisleTopID);

                if (aisleTopName != null)
                {
                    lblAisleName.Text = lblAisleName1.Text = aisleTopName;
                }

                DataTable dtAisle = objBAL.GetAisle(aisleTopID);

                if (dtAisle != null && dtAisle.Rows.Count > 0)
                {
                    dtlAisle.DataSource = dtAisle;
                    dtlAisle.DataBind();

                    foreach (DataListItem item in dtlAisle.Items)
                    {
                        Label lblAisleID = (Label)item.FindControl("lblAisleID");

                        DataTable dtShelf = objBAL.GetShelf(lblAisleID.Text, aisleTopID);

                        DataList dtlShelf = (DataList)item.FindControl("dtlShelf");
                        dtlShelf.DataSource = dtShelf;
                        dtlShelf.DataBind();
                    }
                }
                else
                {
                    lblErrMsg.Text    = "No aisles found";
                    lblErrMsg.Visible = true;
                }
            }
        }