Example #1
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())
                     {
                         Rule item = new Rule(database);
                         item.Id = (int)reader["object_id"];
                         item.Name = reader["Name"].ToString();
                         item.Owner = reader["Owner"].ToString();
                         item.Text = reader["Definition"].ToString();
                         database.Rules.Add(item);
                     }
                 }
             }
         }
     }
 }
Example #2
0
 public UserDataType(ISchemaBase parent)
     : base(parent, Enums.ObjectType.UserDataType)
 {
     Default = new Default(this);
     Rule = new Rule(this);
     Dependencys = new List<ObjectDependency>();
 }
Example #3
0
File: Rule.cs Project: pclancy/ODBX
 public Rule Clone(ISchemaBase parent)
 {
     Rule item = new Rule(parent);
     item.Id = this.Id;
     item.Name = this.Name;
     item.Owner = this.Owner;
     item.Text = this.Text;
     item.Guid = this.Guid;
     return item;
 }