using System; using System.Collections.Generic; using System.ComponentModel; using System.Runtime.Serialization; using System.Web.Script.Serialization; using System.Xml.Serialization; using XCode; using XCode.Configuration; using XCode.DataAccessLayer; namespace XCode.Membership { /// 字典参数 [Serializable] [DataObject] [Description("字典参数")] [BindIndex("IU_Parameter_UserID_Category_Name", true, "UserID,Category,Name")] [BindIndex("IX_Parameter_Category_Name", false, "Category,Name")] [BindIndex("IX_Parameter_UpdateTime", false, "UpdateTime")] [BindTable("Parameter", Description = "字典参数", ConnName = "Membership", DbType = DatabaseType.None)] public partial class Parameter { #region 属性 private Int32 _ID; /// 编号 [DisplayName("编号")] [Description("编号")] [DataObjectField(true, true, false, 0)] [BindColumn("ID", "编号", "")] public Int32 ID { get => _ID; set { if (OnPropertyChanging("ID", value)) { _ID = value; OnPropertyChanged("ID"); } } } private Int32 _UserID; /// 用户。按用户区分参数,用户0表示系统级 [DisplayName("用户")] [Description("用户。按用户区分参数,用户0表示系统级")] [DataObjectField(false, false, false, 0)] [BindColumn("UserID", "用户。按用户区分参数,用户0表示系统级", "")] public Int32 UserID { get => _UserID; set { if (OnPropertyChanging("UserID", value)) { _UserID = value; OnPropertyChanged("UserID"); } } } private String _Category; /// 类别 [DisplayName("类别")] [Description("类别")] [DataObjectField(false, false, true, 50)] [BindColumn("Category", "类别", "")] public String Category { get => _Category; set { if (OnPropertyChanging("Category", value)) { _Category = value; OnPropertyChanged("Category"); } } } private String _Name; /// 名称 [DisplayName("名称")] [Description("名称")] [DataObjectField(false, false, true, 50)] [BindColumn("Name", "名称", "", Master = true)] public String Name { get => _Name; set { if (OnPropertyChanging("Name", value)) { _Name = value; OnPropertyChanged("Name"); } } } private String _Value; /// 数值 [DisplayName("数值")] [Description("数值")] [DataObjectField(false, false, true, 200)] [BindColumn("Value", "数值", "")] public String Value { get => _Value; set { if (OnPropertyChanging("Value", value)) { _Value = value; OnPropertyChanged("Value"); } } } private String _LongValue; /// 长数值 [DisplayName("长数值")] [Description("长数值")] [DataObjectField(false, false, true, 2000)] [BindColumn("LongValue", "长数值", "")] public String LongValue { get => _LongValue; set { if (OnPropertyChanging("LongValue", value)) { _LongValue = value; OnPropertyChanged("LongValue"); } } } private XCode.Membership.ParameterKinds _Kind; /// 种类。0普通,21列表,22名值 [DisplayName("种类")] [Description("种类。0普通,21列表,22名值")] [DataObjectField(false, false, false, 0)] [BindColumn("Kind", "种类。0普通,21列表,22名值", "")] public XCode.Membership.ParameterKinds Kind { get => _Kind; set { if (OnPropertyChanging("Kind", value)) { _Kind = value; OnPropertyChanged("Kind"); } } } private Boolean _Enable; /// 启用 [DisplayName("启用")] [Description("启用")] [DataObjectField(false, false, false, 0)] [BindColumn("Enable", "启用", "")] public Boolean Enable { get => _Enable; set { if (OnPropertyChanging("Enable", value)) { _Enable = value; OnPropertyChanged("Enable"); } } } private Int32 _Ex1; /// 扩展1 [DisplayName("扩展1")] [Description("扩展1")] [DataObjectField(false, false, false, 0)] [BindColumn("Ex1", "扩展1", "")] public Int32 Ex1 { get => _Ex1; set { if (OnPropertyChanging("Ex1", value)) { _Ex1 = value; OnPropertyChanged("Ex1"); } } } private Int32 _Ex2; /// 扩展2 [DisplayName("扩展2")] [Description("扩展2")] [DataObjectField(false, false, false, 0)] [BindColumn("Ex2", "扩展2", "")] public Int32 Ex2 { get => _Ex2; set { if (OnPropertyChanging("Ex2", value)) { _Ex2 = value; OnPropertyChanged("Ex2"); } } } private Double _Ex3; /// 扩展3 [DisplayName("扩展3")] [Description("扩展3")] [DataObjectField(false, false, false, 0)] [BindColumn("Ex3", "扩展3", "")] public Double Ex3 { get => _Ex3; set { if (OnPropertyChanging("Ex3", value)) { _Ex3 = value; OnPropertyChanged("Ex3"); } } } private String _Ex4; /// 扩展4 [DisplayName("扩展4")] [Description("扩展4")] [DataObjectField(false, false, true, 50)] [BindColumn("Ex4", "扩展4", "")] public String Ex4 { get => _Ex4; set { if (OnPropertyChanging("Ex4", value)) { _Ex4 = value; OnPropertyChanged("Ex4"); } } } private String _Ex5; /// 扩展5 [DisplayName("扩展5")] [Description("扩展5")] [DataObjectField(false, false, true, 50)] [BindColumn("Ex5", "扩展5", "")] public String Ex5 { get => _Ex5; set { if (OnPropertyChanging("Ex5", value)) { _Ex5 = value; OnPropertyChanged("Ex5"); } } } private String _Ex6; /// 扩展6 [DisplayName("扩展6")] [Description("扩展6")] [DataObjectField(false, false, true, 50)] [BindColumn("Ex6", "扩展6", "")] public String Ex6 { get => _Ex6; set { if (OnPropertyChanging("Ex6", value)) { _Ex6 = value; OnPropertyChanged("Ex6"); } } } private String _CreateUser; /// 创建者 [DisplayName("创建者")] [Description("创建者")] [DataObjectField(false, false, true, 50)] [BindColumn("CreateUser", "创建者", "")] public String CreateUser { get => _CreateUser; set { if (OnPropertyChanging("CreateUser", value)) { _CreateUser = value; OnPropertyChanged("CreateUser"); } } } private Int32 _CreateUserID; /// 创建用户 [DisplayName("创建用户")] [Description("创建用户")] [DataObjectField(false, false, false, 0)] [BindColumn("CreateUserID", "创建用户", "")] public Int32 CreateUserID { get => _CreateUserID; set { if (OnPropertyChanging("CreateUserID", value)) { _CreateUserID = value; OnPropertyChanged("CreateUserID"); } } } private String _CreateIP; /// 创建地址 [DisplayName("创建地址")] [Description("创建地址")] [DataObjectField(false, false, true, 50)] [BindColumn("CreateIP", "创建地址", "")] public String CreateIP { get => _CreateIP; set { if (OnPropertyChanging("CreateIP", value)) { _CreateIP = value; OnPropertyChanged("CreateIP"); } } } private DateTime _CreateTime; /// 创建时间 [DisplayName("创建时间")] [Description("创建时间")] [DataObjectField(false, false, false, 0)] [BindColumn("CreateTime", "创建时间", "")] public DateTime CreateTime { get => _CreateTime; set { if (OnPropertyChanging("CreateTime", value)) { _CreateTime = value; OnPropertyChanged("CreateTime"); } } } private String _UpdateUser; /// 更新者 [DisplayName("更新者")] [Description("更新者")] [DataObjectField(false, false, true, 50)] [BindColumn("UpdateUser", "更新者", "")] public String UpdateUser { get => _UpdateUser; set { if (OnPropertyChanging("UpdateUser", value)) { _UpdateUser = value; OnPropertyChanged("UpdateUser"); } } } private Int32 _UpdateUserID; /// 更新用户 [DisplayName("更新用户")] [Description("更新用户")] [DataObjectField(false, false, false, 0)] [BindColumn("UpdateUserID", "更新用户", "")] public Int32 UpdateUserID { get => _UpdateUserID; set { if (OnPropertyChanging("UpdateUserID", value)) { _UpdateUserID = value; OnPropertyChanged("UpdateUserID"); } } } private String _UpdateIP; /// 更新地址 [DisplayName("更新地址")] [Description("更新地址")] [DataObjectField(false, false, true, 50)] [BindColumn("UpdateIP", "更新地址", "")] public String UpdateIP { get => _UpdateIP; set { if (OnPropertyChanging("UpdateIP", value)) { _UpdateIP = value; OnPropertyChanged("UpdateIP"); } } } private DateTime _UpdateTime; /// 更新时间 [DisplayName("更新时间")] [Description("更新时间")] [DataObjectField(false, false, false, 0)] [BindColumn("UpdateTime", "更新时间", "")] public DateTime UpdateTime { get => _UpdateTime; set { if (OnPropertyChanging("UpdateTime", value)) { _UpdateTime = value; OnPropertyChanged("UpdateTime"); } } } private String _Remark; /// 备注 [DisplayName("备注")] [Description("备注")] [DataObjectField(false, false, true, 200)] [BindColumn("Remark", "备注", "")] public String Remark { get => _Remark; set { if (OnPropertyChanging("Remark", value)) { _Remark = value; OnPropertyChanged("Remark"); } } } #endregion #region 获取/设置 字段值 /// 获取/设置 字段值 /// 字段名 /// public override Object this[String name] { get { switch (name) { case "ID": return _ID; case "UserID": return _UserID; case "Category": return _Category; case "Name": return _Name; case "Value": return _Value; case "LongValue": return _LongValue; case "Kind": return _Kind; case "Enable": return _Enable; case "Ex1": return _Ex1; case "Ex2": return _Ex2; case "Ex3": return _Ex3; case "Ex4": return _Ex4; case "Ex5": return _Ex5; case "Ex6": return _Ex6; case "CreateUser": return _CreateUser; case "CreateUserID": return _CreateUserID; case "CreateIP": return _CreateIP; case "CreateTime": return _CreateTime; case "UpdateUser": return _UpdateUser; case "UpdateUserID": return _UpdateUserID; case "UpdateIP": return _UpdateIP; case "UpdateTime": return _UpdateTime; case "Remark": return _Remark; default: return base[name]; } } set { switch (name) { case "ID": _ID = value.ToInt(); break; case "UserID": _UserID = value.ToInt(); break; case "Category": _Category = Convert.ToString(value); break; case "Name": _Name = Convert.ToString(value); break; case "Value": _Value = Convert.ToString(value); break; case "LongValue": _LongValue = Convert.ToString(value); break; case "Kind": _Kind = (XCode.Membership.ParameterKinds)value.ToInt(); break; case "Enable": _Enable = value.ToBoolean(); break; case "Ex1": _Ex1 = value.ToInt(); break; case "Ex2": _Ex2 = value.ToInt(); break; case "Ex3": _Ex3 = value.ToDouble(); break; case "Ex4": _Ex4 = Convert.ToString(value); break; case "Ex5": _Ex5 = Convert.ToString(value); break; case "Ex6": _Ex6 = Convert.ToString(value); break; case "CreateUser": _CreateUser = Convert.ToString(value); break; case "CreateUserID": _CreateUserID = value.ToInt(); break; case "CreateIP": _CreateIP = Convert.ToString(value); break; case "CreateTime": _CreateTime = value.ToDateTime(); break; case "UpdateUser": _UpdateUser = Convert.ToString(value); break; case "UpdateUserID": _UpdateUserID = value.ToInt(); break; case "UpdateIP": _UpdateIP = Convert.ToString(value); break; case "UpdateTime": _UpdateTime = value.ToDateTime(); break; case "Remark": _Remark = Convert.ToString(value); break; default: base[name] = value; break; } } } #endregion #region 字段名 /// 取得字典参数字段信息的快捷方式 public partial class _ { /// 编号 public static readonly Field ID = FindByName("ID"); /// 用户。按用户区分参数,用户0表示系统级 public static readonly Field UserID = FindByName("UserID"); /// 类别 public static readonly Field Category = FindByName("Category"); /// 名称 public static readonly Field Name = FindByName("Name"); /// 数值 public static readonly Field Value = FindByName("Value"); /// 长数值 public static readonly Field LongValue = FindByName("LongValue"); /// 种类。0普通,21列表,22名值 public static readonly Field Kind = FindByName("Kind"); /// 启用 public static readonly Field Enable = FindByName("Enable"); /// 扩展1 public static readonly Field Ex1 = FindByName("Ex1"); /// 扩展2 public static readonly Field Ex2 = FindByName("Ex2"); /// 扩展3 public static readonly Field Ex3 = FindByName("Ex3"); /// 扩展4 public static readonly Field Ex4 = FindByName("Ex4"); /// 扩展5 public static readonly Field Ex5 = FindByName("Ex5"); /// 扩展6 public static readonly Field Ex6 = FindByName("Ex6"); /// 创建者 public static readonly Field CreateUser = FindByName("CreateUser"); /// 创建用户 public static readonly Field CreateUserID = FindByName("CreateUserID"); /// 创建地址 public static readonly Field CreateIP = FindByName("CreateIP"); /// 创建时间 public static readonly Field CreateTime = FindByName("CreateTime"); /// 更新者 public static readonly Field UpdateUser = FindByName("UpdateUser"); /// 更新用户 public static readonly Field UpdateUserID = FindByName("UpdateUserID"); /// 更新地址 public static readonly Field UpdateIP = FindByName("UpdateIP"); /// 更新时间 public static readonly Field UpdateTime = FindByName("UpdateTime"); /// 备注 public static readonly Field Remark = FindByName("Remark"); static Field FindByName(String name) => Meta.Table.FindByName(name); } /// 取得字典参数字段名称的快捷方式 public partial class __ { /// 编号 public const String ID = "ID"; /// 用户。按用户区分参数,用户0表示系统级 public const String UserID = "UserID"; /// 类别 public const String Category = "Category"; /// 名称 public const String Name = "Name"; /// 数值 public const String Value = "Value"; /// 长数值 public const String LongValue = "LongValue"; /// 种类。0普通,21列表,22名值 public const String Kind = "Kind"; /// 启用 public const String Enable = "Enable"; /// 扩展1 public const String Ex1 = "Ex1"; /// 扩展2 public const String Ex2 = "Ex2"; /// 扩展3 public const String Ex3 = "Ex3"; /// 扩展4 public const String Ex4 = "Ex4"; /// 扩展5 public const String Ex5 = "Ex5"; /// 扩展6 public const String Ex6 = "Ex6"; /// 创建者 public const String CreateUser = "CreateUser"; /// 创建用户 public const String CreateUserID = "CreateUserID"; /// 创建地址 public const String CreateIP = "CreateIP"; /// 创建时间 public const String CreateTime = "CreateTime"; /// 更新者 public const String UpdateUser = "UpdateUser"; /// 更新用户 public const String UpdateUserID = "UpdateUserID"; /// 更新地址 public const String UpdateIP = "UpdateIP"; /// 更新时间 public const String UpdateTime = "UpdateTime"; /// 备注 public const String Remark = "Remark"; } #endregion } }