• 待搞清楚


    各个的作用

       1:  
       2:  
       3:         [ReadOnly(true), Editable(false)]
       4:         //[ScaffoldColumn(false)]
       5:  
       6:  
       7:         [HiddenInput(DisplayValue = false)]
       8:         [EditorBrowsable(EditorBrowsableState.Advanced)]
       9:         public override int Id
      10:         {
      11:             get { return base.Id; }
      12:         }
      13:  
      14:         [HiddenInput(DisplayValue = false)]
      15:         public int CountryId { get; set; }
      16:  
      17:         [NopResourceDisplayName("Admin.Configuration.Countries.States.Fields.Name")]
      18:         [AllowHtml]
      19:         [DataType(DataType.Text), Required]
      20:         public string Name { get; set; }
      21:  
      22:         [NopResourceDisplayName("Admin.Configuration.Countries.States.Fields.Abbreviation")]
      23:         [AllowHtml]
      24:         [DataType(DataType.Text), Required]
      25:         public string Abbreviation { get; set; }
      26:  
      27:         [NopResourceDisplayName("Admin.Configuration.Countries.States.Fields.Published")]
      28:         [Required]
      29:         public bool Published { get; set; }
      30:  
      31:         [NopResourceDisplayName("Admin.Configuration.Countries.States.Fields.DisplayOrder")]
      32:         //we don't name it "DisplayOrder" because Telerik has a small bug 
      33:         //"if we have one more editor with the same name on a page, it doesn't allow editing"
      34:         //in our case it's state.DisplayOrder
      35:         [Required]
      36:         public int DisplayOrder1 { get; set; }
      37:  
      38:         #region LiuJ 2012-04-30 [2012-04-24_17:05]
      39:         [NopResourceDisplayName("Admin.Configuration.Countries.States.Fields.ParentStateID")]
      40:         [Editable(false)]
      41:         [HiddenInput(DisplayValue = false)]
      42:         [EditorBrowsable(EditorBrowsableState.Advanced)]
      43:         public int ParentStateID { get; set; }
      44:  
      45:         [NopResourceDisplayName("Admin.Configuration.Countries.States.Fields.ParentStateName")]
      46:         [UIHint("StateProvinceTree"), Required]
      47:         public string ParentStateName { get; set; }
      48:  
      49:         [HiddenInput(DisplayValue = false)]
      50:         [ReadOnly(true), Editable(false)]
      51:         [EditorBrowsable(EditorBrowsableState.Never)]
      52:         public string FamilyTree { get; set; }
      53:         #endregion
      54:  
      55:         [UIHint("StateProvinceTree"), Required]
      56:         public IList<StateProvinceLocalizedModel> Locales { get; set; }

    [Editable(false)]   禁用编辑

    ReadOnly(true) 只读,但显示编辑框

    UIHint("StateProvinceTree",”MVC or HTML or More….”,”TableName”,”tb_user”,”ColName”,”User_ID”)    …???还不清楚

    HiddenInput(DisplayValue = false)   编辑的时候就不见了

    [ScaffoldColumn(false)]????

    [EditorBrowsable(EditorBrowsableState.Never)]   设定 该对象在编辑器中的可见性,仅仅是可见性,不影响可用性,见下一篇.

    参考  http://www.dotblogs.com.tw/lastsecret/archive/2010/07/11/16486.aspx

  • 相关阅读:
    使用超酷的jQuery缩略图生成插件NailThumb制作漂亮的缩略图web应用
    极客Web前端开发资源大荟萃#015
    极客编程小挑战#29:实现手机上常见的某一功能的效果显示
    在线制作gif loading图
    极客标签二重大礼华丽登场 宅男宅女必备套装
    SVG矢量图形课程基础入门篇
    浏览器JS交互,点击查询
    11选5专家投注研究算法
    大龙VBox API参数插件
    利用DLL劫持内存补丁技术注入
  • 原文地址:https://www.cnblogs.com/luckjason/p/2518278.html
Copyright © 2020-2023  润新知