Ejemplo n.º 1
0
        protected override void RenderContents(HtmlTextWriter writer)
        {
            Toolbar toolbar = new Toolbar(GetLocalizedString("VehicleLink"), FormatLink("vehicle", null));
            if (IsNeedWriteToolbar)
                toolbar.RenderControl(writer);

            WriteSearchPanel(writer);

            //<div id="qgTree" onclick="tree_toggle(arguments[0])"><ul class="qgContainer">
            writer.AddAttribute(HtmlTextWriterAttribute.Id, "qgTree");
            writer.AddAttribute(HtmlTextWriterAttribute.Onclick, "tree_toggle(arguments[0])");
            writer.RenderBeginTag(HtmlTextWriterTag.Div);

            writer.AddAttribute(HtmlTextWriterAttribute.Class, "qgContainer");
            writer.RenderBeginTag(HtmlTextWriterTag.Ul);

            t_row[] qgroups = Groupses.row;
            if (qgroups != null && qgroups.Length == 1)
            {
                //skip root group if quickgroupid == 10001 ("Ћегковые автомобили")
                t_row rootGroup = qgroups[0];
                if(rootGroup != null && rootGroup.quickgroupid == RootQuickGroupId)
                {
                    qgroups = rootGroup.row;
                }
            }

            if (qgroups != null)
            {
                for (int i = 0; i < qgroups.Length; i++)
                {
                    WriteTreeNode(writer, qgroups[i], 1, (i + 1) == qgroups.Length);
                }
            }

            //</ul></div>
            writer.RenderEndTag();
            writer.RenderEndTag();

            GuayaquilHelper.WriteGuayquilLabel(writer);
        }
Ejemplo n.º 2
0
        protected override void RenderContents(HtmlTextWriter writer)
        {
            WriteJavaScript(writer);

            Toolbar toolbar = new Toolbar(GetLocalizedString("VehicleLink"), FormatLink("vehicle", null));
            if(IsNeedWriteToolbar)
                toolbar.RenderControl(writer);

            if(QuickDetailList.Category == null || QuickDetailList.Category.Length == 0)
            {
                WriteEmptySet(writer);
            }
            else
            {
                foreach (ListQuickDetailCategory category in QuickDetailList.Category)
                {
                    WriteCategory(writer, category);
                }
            }

            GuayaquilHelper.WriteGuayquilLabel(writer);
        }