Ejemplo n.º 1
0
        //下拉
        public static List <FormControlConfig> Add(this List <FormControlConfig> controls,
                                                   string lable, List <DropDownListItem> items, string value = "", string id = "",
                                                   string regex = "", string inputTip = "", string errorTip = "")
        {
            var cfg = new FormControlConfig(lable, id, value, items, -1, regex, inputTip, errorTip);

            return(Add(controls, cfg));
        }
Ejemplo n.º 2
0
        //按钮
        public static List <FormControlConfig> Add(this List <FormControlConfig> controls,
                                                   string lable, FormControlType type,
                                                   string value = "", string id       = "",
                                                   string regex = "", string inputTip = "", string errorTip = "")
        {
            var cfg = new FormControlConfig(lable, id, value, type, -1, regex, inputTip, errorTip);

            return(Add(controls, cfg));
        }
Ejemplo n.º 3
0
 //base
 public static List <FormControlConfig> Add(this List <FormControlConfig> controls, FormControlConfig newControl)
 {
     newControl.id       = newControl.id.HasValue() ? newControl.id : DateTime.Now.Random();
     newControl.sequence = controls.Count + 1;
     controls.Add(newControl);
     return(controls);
 }