Beispiel #1
0
        public string leftmenu1()
        {
            string  MenuItem = "";
            utility obj      = new utility();
            DataSet ds       = GetDataSetForMenu();

            if (ds != null && ds.Tables["Categories"] != null)
            {
                foreach (DataRow parentItem in ds.Tables["Categories"].Rows)
                {
                    MenuItem += "<li><a href='ProductGrid.aspx?subcat=" + parentItem["CatName"].ToString().Replace(' ', '_') + "' class='pram'>" + parentItem["CatName"].ToString().Trim() + "</a></li> ";

                    MenuItem += "</li>";
                }
                MenuItem += "";
            }
            return(MenuItem);
        }
Beispiel #2
0
        public string DTHmenuMobele()
        {
            string  MenuItem = "";
            utility obj      = new utility();
            DataSet ds       = GetDataSetForDTHMenu();

            if (ds != null && ds.Tables["Categories"] != null)
            {
                foreach (DataRow parentItem in ds.Tables["Categories"].Rows)
                {
                    MenuItem += "<li class='has-sub'><a href='javascript:void'>" + parentItem["CatName"].ToString() + " <span class='holder'></span></a> <ul>";
                    foreach (DataRow childItem in parentItem.GetChildRows("Children"))
                    {
                        MenuItem += "<li><a   href=" + (childItem.GetChildRows("SubChildren").Length > 0 ? "javascript:void" : "'ProductGrid.aspx?subcat=" + base64Encode(childItem["SubcatName"].ToString()) + "'") + ">" + childItem["SubcatName"].ToString().Trim() + "</a></li>";
                    }
                    MenuItem += "</ul></li>";
                }
                MenuItem += "";
            }
            return(MenuItem);
        }
Beispiel #3
0
        public string DTHmenu()
        {
            string  MenuItem = "";
            utility obj      = new utility();
            DataSet ds       = GetDataSetForDTHMenu();

            if (ds != null && ds.Tables["Categories"] != null)
            {
                foreach (DataRow parentItem in ds.Tables["Categories"].Rows)
                {
                    MenuItem += "<div class='col_one_quarter'><h3><a href='ProductGrid.aspx?subcat=" + base64Encode(parentItem["CatName"].ToString()) + "'>" + parentItem["CatName"].ToString() + " </a></h3><ul>";
                    foreach (DataRow childItem in parentItem.GetChildRows("Children"))
                    {
                        MenuItem += "<li><a  href='ProductGrid.aspx?subcat=" + base64Encode(childItem["SubcatName"].ToString()) + "'>" + childItem["SubcatName"].ToString() + "</a></li>";
                    }
                    MenuItem += "</ul></div>";
                }
                MenuItem += "";
            }
            return(MenuItem);
        }