예제 #1
0
        private string BuildGrid()
        {
            TagBuilder div = new TagBuilder(TAG_DIV);

            this.SetID(div, this._propertyBag.ControlName, out _controlID);
            //this.SetAttribute(div, ATTRIBUTE_DATA_GRIDPARAM, HTMLEmitterUtility.GetGridControlProperty(this.propertyBag));
            //this.SetAttribute(div, ATTRIBUTE_DATA_GRIDCOLUMNPROP, HTMLEmitterUtility.GetGridControlColumnsProperties(this.propertyBag));

            this.SetAttribute(div, ATTRIBUTE_DATA_INPUTPARAM, HTMLEmitterUtility.GetJsonOfObject(this._propertyBag.ShuttleParam));
            this.SetAttribute(div, ATTRIBUTE_DATA_VALUEMEMBER, _propertyBag.ValueMember);
            this.SetAttribute(div, ATTRIBUTE_DATA_ACTIONURL, _propertyBag.ActionUrl);
            this.SetAttribute(div, ATTRIBUTE_DATA_DISPLAYMEMBER, _propertyBag.DisplayMember);
            this.SetAttribute(div, ATTRIBUTE_DATA_BSHUTTLE, VAL_TRUE);

            return(div.ToString());
        }
예제 #2
0
        private string BuildGrid()
        {
            TagBuilder div = new TagBuilder(TAG_DIV);

            this.SetID(div, this._propertyBag.ControlName, out _controlID);
            this.SetAttribute(div, ATTRIBUTE_DATA_GRIDPARAM, HTMLEmitterUtility.GetGridControlProperty(this._propertyBag));
            this.SetAttribute(div, ATTRIBUTE_DATA_GRIDCOLUMNPROP, HTMLEmitterUtility.GetGridControlColumnsProperties(this._propertyBag));

            this.SetAttribute(div, ATTRIBUTE_DATA_INPUTPARAM, HTMLEmitterUtility.GetJsonOfObject(this._propertyBag.GridParam));

            this.SetAttribute(div, ATTRIBUTE_DATA_VALUEMEMBER, _propertyBag.ValueMember);
            this.SetAttribute(div, ATTRIBUTE_DATA_ACTIONURL, _propertyBag.ActionUrl);

            this.SetAttribute(div, ATTRIBUTE_DATA_BGRID, VAL_TRUE);
            this.SetAttribute(div, ATTRIBUTE_DATA_SELECTION_CHANGE_FUNCTION, this._propertyBag.OnDataRowSelectionChangeFunctionName);

            return(div.ToString());
        }
예제 #3
0
        private string BuildTextBox()
        {
            TagBuilder controlTag = new TagBuilder(TAG_INPUT);

            this.SetAttribute(controlTag, ATTRIBUTE_TYPE, ATTR_VAL_TEXT);
            this.SetID(controlTag, this._propertyBag.ControlName, out _controlID);
            this.SetControlCssClasses(controlTag, this._propertyBag.CssClass, this._propertyBag.ControlErrorCssClass);

            if (true == _propertyBag.Masking)
            {
                this.BuildHiddenTag(this._propertyBag.ControlName, this._propertyBag.EncryptedValue, out _hiddenTag);
                this.SetAttribute(controlTag, ATTRIBUTE_NAME, "hid_" + this._propertyBag.ControlName);
            }
            else
            {
                this.SetAttribute(controlTag, ATTRIBUTE_NAME, this._propertyBag.ControlName);
            }

            if (this._propertyBag.Style != null)
            {
                this.SetAttribute(controlTag, ATTRIBUTE_STYLE, this._propertyBag.Style.GetStyle());
            }

            if (_propertyBag.AutoCompleteProperties != null && _propertyBag.AutoComplete)
            {
                this.SetAttribute(controlTag, _propertyBag.AutoComplete, ATTRIBUTE_DATA_ACPARAM, HTMLEmitterUtility.GetAutoCompleteParams(_propertyBag.AutoCompleteProperties));
            }

            this.SetValidations(controlTag, _propertyBag.ReadOnly);
            this.SetAutoCompleteAttributes(controlTag, this._propertyBag.AutoComplete, _propertyBag.AutoCompleteInputFunction);

            this.SetAttribute(controlTag, ATTRIBUTE_TABINDEX, this._propertyBag.TabIndex);
            this.SetAttribute(controlTag, ATTRIBUTE_TITLE, this._propertyBag.ToolTip);
            this.SetAttribute(controlTag, ATTRIBUTE_VALUE, this.Value);
            this.SetAttribute(controlTag, ATTRIBUTE_PLACEHOLDER, this._propertyBag.WaterMarkText);
            this.SetAttribute(controlTag, ATTRIBUTE_READONLY, ATTR_VAL_READONLY, this._propertyBag.ReadOnly);
            this.SetAttribute(controlTag, ATTRIBUTE_DISABLED, ATTR_VAL_DISABLED, !this._propertyBag.Enabled);
            this.SetLeaveEvent(controlTag);
            this.SetFunction(controlTag, ATTRIBUTE_DATA_ONLEAVE, _propertyBag.OnLeaveFunction);
            this.SetFunction(controlTag, ATTRIBUTE_ONKEYUP, _propertyBag.OnKeyUpFunction);
            this.SetFunction(controlTag, ATTRIBUTE_ONCHANGE, _propertyBag.OnChangeFunction);
            this.SetFunction(controlTag, ATTRIBUTE_ONKEYDOWN, _propertyBag.OnKeyDownFunction);
            this.SetCustomAttributes(controlTag, _propertyBag.Attributes);

            if (this.LengthValidation != null)
            {
                this.SetAttribute(controlTag, ATTRIBUTE_MAXLENGTH, this.LengthValidation.MaxLength);
            }

            return(controlTag.ToString(TagRenderMode.SelfClosing));
        }