Ejemplo n.º 1
0
        protected void ddParentMenu_SelectedIndexChanged(object sender, EventArgs e)
        {
            int SelectedMenuID    = Convert.ToInt32(ddParentMenu.SelectedValue);
            AdministrationDAC dac = new AdministrationDAC();
            var dr = dac.RetrieveMenu(SelectedMenuID);

            if (dr != null)
            {
                if (EditMode)
                {
                    if (dr.ParentMenuID != 0)
                    {
                        lblmenuLvl.Text = "2";
                    }
                    else if (dr.ParentMenuID == 0)
                    {
                        lblmenuLvl.Text = "1";
                    }
                }
                else if (!EditMode)
                {
                    if (dr.ParentMenuID == 0)
                    {
                        lblmenuLvl.Text = "2";
                    }
                    else
                    {
                        lblmenuLvl.Text = "1";
                    }
                }
            }
            else
            {
                lblmenuLvl.Text = "1";
            }
        }