예제 #1
0
        protected BaseGridFilter(string labelText, string inputName, TextBoxTypeEnum type = default, string tooltip = default)
        {
            Check.NotEmpty(labelText, nameof(labelText));
            Check.NotEmpty(inputName, nameof(inputName));

            this.Tooltip    = tooltip;
            this.LabelText  = labelText;
            this.InputName  = inputName;
            this._inputType = JavaScriptEnumMappings.ToString(type);
        }
예제 #2
0
        /// <summary>
        /// Text box type enum.
        /// </summary>
        /// <param name="type"></param>
        /// <returns></returns>
        public static string ToString(TextBoxTypeEnum type)
        {
            switch (type)
            {
            case TextBoxTypeEnum.Text:
                return("text");

            case TextBoxTypeEnum.Password:
                return("password");

            case TextBoxTypeEnum.Hidden:
                return("hidden");

            default:
                throw new Exception("error type.");
            }
        }
예제 #3
0
 public LabeledIntegerBox(string label, Expression <Func <TPostModel, int?> > expression, Expression <Func <TModel, int?> > modelExpression = null, TextBoxTypeEnum type = default)
 {
     this._expression      = expression;
     this._modelExpression = modelExpression;
     this._label           = label;
     this.type             = JavaScriptEnumMappings.ToString(type);
 }
예제 #4
0
 public static void SetTypeFormat(DependencyObject dependencyObject, TextBoxTypeEnum value)
 {
     dependencyObject.SetValue(TypeFormatProperty, value);
 }