Example #1
0
 public string Pad(Field fld)
 {
     int colMaxLen = fld.Column.MaxLength;
     return fld.Value.PadRight(colMaxLen);
 }
Example #2
0
 public Field[] this[Row row]
 {
     get{
         Field[]  flds = new Field[this._table.Columns.Count];
         int i = 0;
         bool filled = false;
         foreach(Field fld in _table.Fields){
             if (fld.Row == row){
                 flds[i++] = fld;
                 filled = true;
             }
         }
         if (!filled){
             foreach(Column col in _table.Columns){
                 Field fld= new Field(_table, row, col);
                 flds[i++] = fld;
                 List.Add(fld);
             }
         }
      				return flds;
     }
 }
Example #3
0
 public Field Add(Field fld)
 {
     List.Add(fld);
     return fld;
 }
Example #4
0
 public Field this[Column col, int row]
 {
     get{
         foreach(Field fld in _table.Fields){
             if (fld.Column.Id == col.Id && fld.Row.Id == row){
                 return fld;
             }
         }
         Field ret = new Field(_table, row, col);
         List.Add(ret);
         return ret;
     }
 }