Exemplo n.º 1
0
        /// <summary>
        /// 设置该属性可显示的范围
        /// </summary>
        /// <param name="meta"></param>
        /// <param name="value"></param>
        /// <returns></returns>
        public static WebEntityPropertyViewMeta ShowIn(this WebEntityPropertyViewMeta meta, ShowInWhere value)
        {
            if (value == ShowInWhere.Hide)
            {
                meta.ShowInWhere = ShowInWhere.Hide;
            }
            else
            {
                meta.ShowInWhere |= value;
            }

            return(meta);
        }
Exemplo n.º 2
0
 /// <summary>
 /// 设置属性的显示名称
 /// </summary>
 /// <param name="meta"></param>
 /// <param name="label"></param>
 /// <returns></returns>
 public static WebEntityPropertyViewMeta HasLabel(this WebEntityPropertyViewMeta meta, string label)
 {
     meta.Label = label;
     return(meta);
 }
Exemplo n.º 3
0
        /// <summary>
        /// 设置该属性是否为只读
        /// </summary>
        /// <param name="meta"></param>
        /// <param name="value"></param>
        /// <returns></returns>
        public static WebEntityPropertyViewMeta Readonly(this WebEntityPropertyViewMeta meta, bool value = true)
        {
            meta.IsReadonly = value;

            return(meta);
        }