Example #1
0
 public Column(Table table, string header, int id)
 {
     Field headerFld;
     _table = table; _id = id;
     if (header.Trim() != ""){
         headerFld = _table.Fields[this, 0];
         headerFld.Value = header;
         headerFld.IsHeader = true;
     }
 }
Example #2
0
 public Table Add(Table table)
 {
     _tables.Add(table);
     return table;
 }
Example #3
0
 public Columns(Table table)
 {
     _table = table;
 }
Example #4
0
 public Rows(Table table)
 {
     _table = table;
 }
Example #5
0
 public Row(Table table, int id)
 {
     _id = id;
     _table = table;
     Field[] flds = _table.Fields[this];
     for(int i=0; i<flds.Length; i++){
         flds[i].Value = ""; //Blank row
     }
 }
Example #6
0
 public Row(Table table, string[] vals, int id)
 {
     _id = id;
     _table = table;
     Field[] flds = _table.Fields[this];
     for(int i=0; i<vals.Length; i++){
         flds[i].Value = vals[i];
     }
 }
Example #7
0
 /*public string[] PrintText{
     get{
         //TODO: This isn't done. I might can be used to shink the width of a report to make it fit on a page.
         int colWidth;
         string rowString = "";
         ArrayList printText = new ArrayList();
         foreach(Sheet sheet in _sheets){
             foreach(Table table in sheet.Tables){
                 colWidth = (93 / table.Columns.Count) - Table.COLUMN_PAD;
                 foreach(Row row in table.Rows){
                     foreach(Field fld in row.Fields){
                         if (fld.Value.Length > colWidth)
                             fldVal = fld.Value.Substring(1, colWidth);
                         else
                             fldVal = fld.Value.PadRight(
                                 //rowString = fld.Value.Substring(1, colWidth) + " ".PadRight(Table.COLUMN_PAD);
                                 //printText.Add(rowString);
                 }
             }
         }
         return (string[])printText.ToArray();
     }
 }*/
 protected Table CreateDefaultTable(string title, params string[] columnHeaders)
 {
     Table table;
     Sheet sheet;
     if (_sheets[0] == null){
         sheet = new Sheet(this,title);
         _sheets.Add(sheet);
         table = new Table(sheet, title, columnHeaders);
         sheet.Add(table);
     }else{
         table = _sheets[0][0];
     }
     return table;
 }
Example #8
0
 public Fields(Table table)
 {
     _table = table;
 }
Example #9
0
 public Field(Table table, int row, int col)
 {
     _table = table;
     _column = _table.Columns[col];
     _row = _table.AddRow();
 }
Example #10
0
 public Field(Table table, int row, Column col)
 {
     _table = table;
     _row = _table.Rows[row];
     if (_row == null)
         _row = _table.AddRow();
     _column = col;
 }
Example #11
0
 public Field(Table table, Row row, Column col)
 {
     _table = table; _row = row; _column = col;
 }
Example #12
0
 public Table Add(Table table)
 {
     List.Add(table);
     return table;
 }