protected void RenderImageSlideSelectionControl(ComponentController paComponentController, InputInfoRow paInputInfoRow, String paActiveValue) { paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_LinkColumn, paInputInfoRow.LinkColumn.ToLower()); paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_ColumnName, paInputInfoRow.InputName.ToLower()); paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_Type, paInputInfoRow.InputMode.ToLower()); paComponentController.AddElementType(ComponentController.ElementType.ImageSlideSelectionControl); paComponentController.RenderBeginTag(HtmlTag.Div); //paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_OriginalValue, paActiveValue); //paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_ColumnName, lcInputInfoRow.InputName.ToLower()); //paComponentController.AddAttribute(HtmlAttribute.Value, paActiveValue); paComponentController.AddAttribute(HtmlAttribute.Src, paActiveValue); paComponentController.RenderBeginTag(HtmlTag.Img); paComponentController.RenderEndTag(); paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_OriginalValue, paActiveValue); paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_ColumnName, paInputInfoRow.InputName.ToLower()); paComponentController.AddAttribute(HtmlAttribute.ReadOnly, "readonly"); paComponentController.AddAttribute(HtmlAttribute.Value, paActiveValue); paComponentController.AddAttribute(HtmlAttribute.Type, "text"); paComponentController.RenderBeginTag(HtmlTag.Input); paComponentController.RenderEndTag(); paComponentController.RenderEndTag(); }
private void RenderSelectBox(ComponentController paComponentController, InputInfoRow lcInputInfoRow, String paActiveValue) { MetaDataBlock lcOptionList; MetaDataElement lcOptionItem; lcOptionList = (new MetaDataBlockCollection(lcInputInfoRow.AdditionalInfo))[0]; if (lcOptionList != null) { paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_PluginMode, "sumoselect"); paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_ColumnName, lcInputInfoRow.InputName.ToLower()); paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_OriginalValue, paActiveValue); paComponentController.RenderBeginTag(HtmlTag.Select); for (int lcCount = 0; lcCount < lcOptionList.MetaDataElementCount; lcCount++) { lcOptionItem = lcOptionList[lcCount]; if (String.Equals(lcOptionItem[0], paActiveValue, StringComparison.OrdinalIgnoreCase)) { paComponentController.AddAttribute(HtmlAttribute.Selected, "true"); } paComponentController.AddAttribute(HtmlAttribute.Value, lcOptionItem[0]); paComponentController.RenderBeginTag(HtmlTag.Option); paComponentController.Write(lcOptionItem.Name); paComponentController.RenderEndTag(); } paComponentController.RenderEndTag(); } }
protected void RenderSlideSelectionControl(ComponentController paComponentController, InputInfoRow paInputInfoRow, String paActiveValue) { paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_LinkColumn, paInputInfoRow.LinkColumn.ToLower()); paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_ColumnName, paInputInfoRow.InputName.ToLower()); paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_Type, paInputInfoRow.InputMode.ToLower()); paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_Command, ctCMDOpenSlide); paComponentController.AddElementType(ComponentController.ElementType.SlideSelectionControl); paComponentController.RenderBeginTag(HtmlTag.Div); paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_OriginalValue, paActiveValue); paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_ColumnName, paInputInfoRow.InputName.ToLower()); if (IsAttributeSet(paInputInfoRow, InputInfoAttribute.Persist)) { paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_Persist, "true"); } paComponentController.AddAttribute(HtmlAttribute.ReadOnly, "readonly"); paComponentController.AddAttribute(HtmlAttribute.Value, paActiveValue); paComponentController.AddAttribute(HtmlAttribute.Type, "text"); paComponentController.RenderBeginTag(HtmlTag.Input); paComponentController.RenderEndTag(); paComponentController.RenderEndTag(); }
private void RenderInputBoxStatic(ComponentController paComponentController, InputInfoRow lcInputInfoRow, String paActiveValue) { paComponentController.AddAttribute(HtmlAttribute.Style, lcInputInfoRow.InputCss); paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_ColumnName, lcInputInfoRow.InputName.ToLower()); paComponentController.AddElementType(ComponentController.ElementType.InputBox); paComponentController.RenderBeginTag(HtmlTag.Div); paComponentController.Write(paActiveValue); paComponentController.RenderEndTag(); }
protected void RenderCalendarControl(ComponentController paComponentController, InputInfoRow paInputInfoRow, String paActiveValue) { paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_Command, ctCMDOpenCalendar); paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_ColumnName, paInputInfoRow.InputName.ToLower()); paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_Type, paInputInfoRow.InputMode.ToLower()); paComponentController.AddElementType(ComponentController.ElementType.CalendarControl); paComponentController.RenderBeginTag(HtmlTag.Div); paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_OriginalValue, paActiveValue); paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_ColumnName, paInputInfoRow.InputName.ToLower()); paComponentController.AddAttribute(HtmlAttribute.ReadOnly, "readonly"); paComponentController.AddAttribute(HtmlAttribute.Value, paActiveValue); paComponentController.AddAttribute(HtmlAttribute.Type, "text"); paComponentController.RenderBeginTag(HtmlTag.Input); paComponentController.RenderEndTag(); paComponentController.RenderEndTag(); }
protected void RenderColorSlideSelectionControl(ComponentController paComponentController, InputInfoRow paInputInfoRow, String paActiveValue) { paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_LinkColumn, paInputInfoRow.LinkColumn.ToLower()); paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_ColumnName, paInputInfoRow.InputName.ToLower()); paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_Type, paInputInfoRow.InputMode.ToLower()); paComponentController.AddElementType(ComponentController.ElementType.ColorSlideSelectionControl); paComponentController.RenderBeginTag(HtmlTag.Div); paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_OriginalValue, paActiveValue); paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_ColumnName, paInputInfoRow.InputName.ToLower()); paComponentController.AddAttribute(HtmlAttribute.ReadOnly, "readonly"); paComponentController.AddAttribute(HtmlAttribute.Style, "background:" + paActiveValue + ";color:" + General.ContrastColor(paActiveValue)); paComponentController.AddAttribute(HtmlAttribute.Value, paActiveValue); paComponentController.AddAttribute(HtmlAttribute.Type, "text"); paComponentController.RenderBeginTag(HtmlTag.Input); paComponentController.RenderEndTag(); paComponentController.RenderEndTag(); }
private void RenderInputBoxTextBox(ComponentController paComponentController, InputInfoRow paInputInfoRow, String paActiveValue, bool paMultiline) { String lcInputType; if (paInputInfoRow.MaxLimit > 0) { paComponentController.AddAttribute(HtmlAttribute.Maxlength, paInputInfoRow.MaxLimit.ToString()); } if (!paInputInfoRow.InputName.StartsWith(ctVirtualColumnPrefix)) { paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_ColumnName, paInputInfoRow.InputName.ToLower()); } paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_InputMode, paInputInfoRow.InputMode.Trim()); if (IsAttributeSet(paInputInfoRow, InputInfoAttribute.DelimitedList)) { paActiveValue = paActiveValue.Replace(ctMultilineDelimiter, ctCR); paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_Mode, "delimited"); } if (IsAttributeSet(paInputInfoRow, InputInfoAttribute.Mandatory)) { paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_Mandatory, "true"); } if (IsAttributeSet(paInputInfoRow, InputInfoAttribute.Identifier)) { paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_IdentifierColumn, "true"); } if (IsAttributeSet(paInputInfoRow, InputInfoAttribute.KeyField)) { paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_KeyField, "true"); } if (IsAttributeSet(paInputInfoRow, InputInfoAttribute.DataMirror)) { paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_MirrorColumn, paInputInfoRow.LinkColumn); } if (IsAttributeSet(paInputInfoRow, InputInfoAttribute.Persist)) { paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_Persist, "true"); } if ((clForceReadOnlyMode) || (IsAttributeSet(paInputInfoRow, InputInfoAttribute.ReadOnly))) { paComponentController.AddAttribute(HtmlAttribute.ReadOnly, "true"); } if (!String.IsNullOrEmpty(paInputInfoRow.QueryName)) { if (paInputInfoRow.QueryName.Contains(".")) { paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_QueryName, paInputInfoRow.QueryName); } else { paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_QueryName, paInputInfoRow.InputGroup + "." + paInputInfoRow.QueryName); } } paComponentController.AddAttribute(HtmlAttribute.Style, paInputInfoRow.InputCss); paComponentController.AddAttribute(HtmlAttribute.Name, paInputInfoRow.InputName); paComponentController.AddElementType(ComponentController.ElementType.InputBox); if (!IsAttributeSet(paInputInfoRow, InputInfoAttribute.Password)) { if (IsAttributeSet(paInputInfoRow, InputInfoAttribute.DynamicNumber)) { paActiveValue = clLanguageManager.ConvertNumber(paActiveValue); } paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_OriginalValue, paActiveValue); paComponentController.AddAttribute(HtmlAttribute.Value, paActiveValue); lcInputType = "text"; } else { paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_OriginalValue, General.Base64Encode(paActiveValue)); lcInputType = "password"; } if (paMultiline) { paComponentController.RenderBeginTag(HtmlTag.Textarea); paComponentController.Write(paActiveValue); } else { //if (IsAttributeSet(lcInputInfoRow, InputInfoAttribute.Password)) paComponentController.AddAttribute(HtmlAttribute.Type, "password"); //else paComponentController.AddAttribute(HtmlAttribute.Type, "text"); paComponentController.AddAttribute(HtmlAttribute.Type, lcInputType); paComponentController.RenderBeginTag(HtmlTag.Input); } paComponentController.RenderEndTag(); }
public void RenderSubGroup(ComponentController paComponentController, String paPrimaryClass, String paSubGroup, MetaDataRow paMetaDataRow) { DataRow[] lcDataRow; InputInfoRow lcInputInfoRow; String lcActiveValue; if ((lcDataRow = GetInputInfoListBySubGroup(paSubGroup)).Length > 0) { lcInputInfoRow = new InputInfoRow(lcDataRow[0]); if (!String.IsNullOrEmpty(lcInputInfoRow.ElementCss)) { if (!lcInputInfoRow.ElementCss.Contains(ctCSSSeparator)) { paPrimaryClass = (paPrimaryClass + " " + lcInputInfoRow.ElementCss).Trim(); } } if (IsAttributeSet(lcInputInfoRow, InputInfoAttribute.PopUpBlock)) { for (int lcCount = 0; lcCount < lcDataRow.Length; lcCount++) { lcInputInfoRow.Row = lcDataRow[lcCount]; if (!IsAttributeSet(lcInputInfoRow, InputInfoAttribute.Title)) { RenderElementComponent(paComponentController, lcInputInfoRow, String.Empty); } } } else { if (IsAttributeSet(lcInputInfoRow, InputInfoAttribute.HideBlock)) { paComponentController.AddElementAttribute(ComponentController.ElementAttribute.ea_Appearance, "hidden"); } paComponentController.AddElementType(ComponentController.ElementType.InputBlock); paComponentController.AddAttribute(HtmlAttribute.Class, paPrimaryClass); paComponentController.RenderBeginTag(HtmlTag.Div); for (int lcCount = 0; lcCount < lcDataRow.Length; lcCount++) { lcInputInfoRow.Row = lcDataRow[lcCount]; if (IsAttributeSet(lcInputInfoRow, InputInfoAttribute.Title)) { RenderTitle(paComponentController, lcInputInfoRow); } else { if ((paMetaDataRow != null) && (paMetaDataRow.HasPreloadedData)) { lcActiveValue = paMetaDataRow.ActiveData.GetData(lcInputInfoRow.InputName, String.Empty); } else { lcActiveValue = ApplicationFrame.GetInstance().ActiveFormInfoManager.TranslateStringExStr(lcInputInfoRow.DefaultValue); } RenderRow(paComponentController, lcInputInfoRow, lcActiveValue); } } paComponentController.RenderEndTag(); } } }