Ejemplo n.º 1
0
        protected void RenderSelectionPanel(ComponentController paComponentController, SelectionPanelType paSelectionPanelType, String paMode, String paTitle, Dictionary <String, String> paDictionary)
        {
            SubControlSelectionPanel lcSubControlSelectionPanel;

            lcSubControlSelectionPanel = new SubControlSelectionPanel(paSelectionPanelType.ToString().ToLower(), paMode, paTitle, paDictionary);
            lcSubControlSelectionPanel.RenderChildMode(paComponentController);
        }
Ejemplo n.º 2
0
        protected void RenderSelectionControl(ComponentController paComponentController, String paColumnName, Dictionary <String, String> paDictionary, SelectionPanelType paSelectionPanelType)
        {
            String lcActiveValue;
            String lcActiveData;

            GetActiveValue(paSelectionPanelType, out lcActiveValue, out lcActiveData);

            paComponentController.AddAttribute(HtmlAttribute.Value, lcActiveValue.ToUpper());
            paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_Type, paSelectionPanelType.ToString().ToLower());
            paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_ColumnName, paColumnName.ToLower());
            paComponentController.AddAttribute(HtmlAttribute.Class, ctCLSSelectionControl);
            paComponentController.RenderBeginTag(HtmlTag.Div);

            paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_OriginalValue, lcActiveValue);
            paComponentController.AddAttribute(HtmlAttribute.ReadOnly, "readonly");
            paComponentController.AddAttribute(HtmlAttribute.Value, lcActiveData);
            paComponentController.AddAttribute(HtmlAttribute.Type, "text");
            paComponentController.RenderBeginTag(HtmlTag.Input);

            paComponentController.RenderEndTag();

            paComponentController.RenderEndTag();
        }
Ejemplo n.º 3
0
        protected void RenderSelectionControlSection(ComponentController paComponentController, String paLabel, String paColumnName, Dictionary <String, String> paDictionary, SelectionPanelType paSelectionPanelType)
        {
            paComponentController.AddAttribute(HtmlAttribute.Class, ctCLSInputRow);
            paComponentController.AddElementType(ComponentController.ElementType.InputRow);
            paComponentController.RenderBeginTag(HtmlTag.Div);

            paComponentController.AddAttribute(HtmlAttribute.Class, ctCLSLabel);
            paComponentController.RenderBeginTag(HtmlTag.Div);
            paComponentController.RenderBeginTag(HtmlTag.Span);
            paComponentController.Write(paLabel);
            paComponentController.RenderEndTag();
            paComponentController.RenderEndTag();

            RenderSelectionControl(paComponentController, paColumnName, paDictionary, paSelectionPanelType);

            paComponentController.RenderEndTag();
        }
Ejemplo n.º 4
0
        private void GetActiveValue(SelectionPanelType paSelectionPanelType, out String paActiveValue, out String paActiveData)
        {
            paActiveValue = String.Empty;
            paActiveData  = String.Empty;

            switch (paSelectionPanelType)
            {
            case SelectionPanelType.Category:
            {
                if (clMetaDataRow.ActiveRow != null)
                {
                    paActiveValue = clMetaDataRow.ActiveData.GetData(ctCOLCategory, String.Empty);
                    paActiveData  = paActiveValue;
                }
                else
                {
                    paActiveValue = ctDEFCategorySelection;
                    paActiveData  = paActiveValue;
                }
                break;
            }

            case SelectionPanelType.Manufacturer:
            {
                if (clMetaDataRow.ActiveRow != null)
                {
                    paActiveValue = clMetaDataRow.ActiveData.GetData(ctCOLManufacturer, String.Empty);
                    paActiveData  = paActiveValue;
                }
                else
                {
                    paActiveValue = ctDEFManufacturerSelection;
                    paActiveData  = paActiveValue;
                }
                break;
            }

            case SelectionPanelType.ProductName:
            {
                if (clMetaDataRow.ActiveRow != null)
                {
                    paActiveValue = clMetaDataRow.ActiveData.GetData(ctCOLProductUID, String.Empty);

                    if (paActiveValue != ctOtherValue)
                    {
                        paActiveValue = clMetaDataRow.ActiveData.GetData(ctCOLCategory, String.Empty) + "," + clMetaDataRow.ActiveData.GetData(ctCOLManufacturer, String.Empty) + ";" + paActiveValue;
                    }

                    if (clProductNameList.Keys.Contains(paActiveValue))
                    {
                        paActiveData = clProductNameList[paActiveValue];
                    }
                }
                else
                {
                    paActiveValue = ctDEFProductNameSelection;
                    paActiveData  = clProductNameList[ctDEFProductNameSelection];
                }
                break;
            }

            case SelectionPanelType.NetworkType:
            {
                if (clMetaDataRow.ActiveRow != null)
                {
                    paActiveValue = clMetaDataRow.ActiveData.GetData(ctCOLKind, String.Empty);
                    paActiveData  = paActiveValue;
                }
                else
                {
                    paActiveValue = ctDEFNetworkSelection;
                    paActiveData  = paActiveValue;
                }
                break;
            }
            }
        }