예제 #1
0
        private void createRowWithEntry(SDON.Model.Table table, int rowNum, SQLCSVLine entry, bool showLabel, bool showKey, bool showType, bool showSize)
        {
            SDON.Model.Cell cell;
            int             column = 1;

            if (showKey)
            {
                bool isForeignKey = (entry.ConstraintType.ToLower() == "foreign key") || (entry.ConstraintType.ToLower() == "r");
                bool isPrimaryKey = (entry.ConstraintType.ToLower() == "primary key") || (entry.ConstraintType.ToLower() == "p");
                bool isUniqueKey  = (entry.ConstraintType.ToLower() == "unique") || (entry.ConstraintType.ToLower() == "u");

                cell        = createCellTemplate();
                cell.Row    = rowNum;
                cell.Column = column;
                //cell.ImageURL = new SDON.Model.Image();

                if (isForeignKey)
                {
                    //cell.ImageURL.url = "";
                    cell.Label = "F";
                }
                else if (isPrimaryKey)
                {
                    //cell.ImageURL.url = "";
                    cell.Label = "P";
                }
                else if (isUniqueKey)
                {
                    //cell.ImageURL.url = "";
                    cell.Label = "U";
                }
                else
                {
                    //cell.ImageURL = null;
                }

                table.Cell.Add(cell);
                column++;
            }

            if (showLabel)
            {
                cell        = createCellTemplate();
                cell.Row    = rowNum;
                cell.Column = column;
                cell.Label  = entry.ColumnName;
                table.Cell.Add(cell);
                column++;
            }

            if (showType)
            {
                cell        = createCellTemplate();
                cell.Row    = rowNum;
                cell.Column = column;
                cell.Label  = entry.DataType;
                table.Cell.Add(cell);
                column++;
            }

            if (showSize)
            {
                cell        = createCellTemplate();
                cell.Row    = rowNum;
                cell.Column = column;
                cell.Label  = (entry.ColumnSize != "NULL") ? entry.ColumnSize : "";
                table.Cell.Add(cell);
                column++;
            }
        }
예제 #2
0
 public void AddEntry(SQLCSVLine entry)
 {
     _entries.Add(entry);
 }