public UserDataType(ISchemaBase parent) : base(parent, Enums.ObjectType.UserDataType) { Default = new Default(this); Rule = new Rule(this); Dependencys = new List<ObjectDependency>(); }
public void Fill(Database database, string connectionString) { if (database.Options.Ignore.FilterRules) { using (SqlConnection conn = new SqlConnection(connectionString)) { using (SqlCommand command = new SqlCommand(GetSQL(), conn)) { conn.Open(); using (SqlDataReader reader = command.ExecuteReader()) { while (reader.Read()) { Default item = new Default(database); item.Id = (int)reader["object_id"]; item.Name = reader["Name"].ToString(); item.Owner = reader["Owner"].ToString(); item.Value = reader["Definition"].ToString(); database.Defaults.Add(item); } } } } } }
public bool Compare(Default obj) { if (obj == null) throw new ArgumentNullException("obj"); if (Name != obj.Name) return false; //if (Owner != obj.Owner) return false; if (Value != obj.Value) return false; return true; }
public Default Clone(ISchemaBase parent) { Default item = new Default(parent); item.Id = this.Id; item.Name = this.Name; item.Owner = this.Owner; item.Value = this.Value; return item; }