private void Add_Table_Click(object sender, RoutedEventArgs e)
        {
            Table table = new Table()
            {
                TableInfo = TableInfoBox.Text
            };
            ITableRepository repository = new TableRepository();

            repository.CreateTable(table);
        }
Example #2
0
 private Column getColumn(Table table, string columnName)
 {
     var column = table.Columns.SingleOrDefault(c => c.Name.EqualsIC(columnName));
     if (column == null)
         throw new ZException("Table [{0}] does not contain the column with specified name: {1}.", table.Name, columnName);
     return column;
 }
Example #3
0
 private int getColumnIndex(Table table, string columnName)
 {
     for (var i = 0; i < table.Columns.Count; i++)
     {
         if (table.Columns[i].Name.EqualsIC(columnName))
             return i;
     }
     throw new ZException("Table [{0}] does not contain the column with specified name: {1}.", table.Name, columnName);
 }
Example #4
0
 private bool hasColumn(Table table, string columnName)
 {
     return table.Columns.Any(c => c.Name.EqualsIC(columnName));
 }