#region using statements using System; using System.Collections.Generic; using DataJuggler.UltimateHelper; #endregion namespace DataJuggler.Excelerate { #region class Row /// /// This class represents the Columns make up the Data for an excel sheet. /// public class Row { #region Private Variables private List columns; private int number; private Guid id; private bool isHeaderRow; #endregion #region Constructor /// /// Create a new instance of a 'Row' object. /// public Row() { // Create a new collection of 'Column' objects. Columns = new List(); } #endregion #region Methods #region FindColumn(string name) /// /// returns the Column /// public Column FindColumn(string name) { // initial value Column column = null; // if the value for HasColumns is true if (HasColumns) { // Iterate the collection of Column objects foreach (Column tempColumn in Columns) { if (TextHelper.IsEqual(tempColumn.ColumnName, name)) { // set the return value column = tempColumn; // break out of the loop break; } } } // return value return column; } #endregion #endregion #region Properties #region Columns /// /// This property gets or sets the value for 'Columns'. /// public List Columns { get { return columns; } set { columns = value; } } #endregion #region HasColumns /// /// This property returns true if this object has a 'Columns'. /// public bool HasColumns { get { // initial value bool hasColumns = (this.Columns != null); // return value return hasColumns; } } #endregion #region Id /// /// This property gets or sets the value for 'Id'. /// public Guid Id { get { return id; } set { id = value; } } #endregion #region IsHeaderRow /// /// This property gets or sets the value for 'IsHeaderRow'. /// public bool IsHeaderRow { get { return isHeaderRow; } set { isHeaderRow = value; } } #endregion #region Number /// /// This property gets or sets the value for 'Number'. /// public int Number { get { return number; } set { number = value; } } #endregion #endregion } #endregion }