示例#1
0
 public UserDataType(ISchemaBase parent)
     : base(parent, Enums.ObjectType.UserDataType)
 {
     Default = new Default(this);
     Rule = new Rule(this);
     Dependencys = new List<ObjectDependency>();
 }
示例#2
0
 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);
                     }
                 }
             }
         }
     }
 }
示例#3
0
 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;
 }
示例#4
0
 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;
 }