Beispiel #1
0
        private bool HasDataSource(string controlType)
        {
            if (string.IsNullOrEmpty(controlType))
            {
                return(false);
            }
            var control = ControlHelper.Resolve(controlType);

            if (control == null)
            {
                return(false);
            }
            return(control.HasDataSource);
        }
Beispiel #2
0
        public static string Enctype(this ISchema schema)
        {
            var upload = schema.Columns.Select(it => string.IsNullOrEmpty(it.ControlType) ? null : ControlHelper.Resolve(it.ControlType)).Any(it => it != null && it.IsFile == true);

            return(upload ? "multipart/form-data" : "application/x-www-form-urlencoded");
        }