-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRow.cs
More file actions
142 lines (119 loc) · 3.69 KB
/
Row.cs
File metadata and controls
142 lines (119 loc) · 3.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
#region using statements
using System;
using System.Collections.Generic;
using DataJuggler.UltimateHelper;
#endregion
namespace DataJuggler.Excelerate
{
#region class Row
/// <summary>
/// This class represents the Columns make up the Data for an excel sheet.
/// </summary>
public class Row
{
#region Private Variables
private List<Column> columns;
private int number;
private Guid id;
private bool isHeaderRow;
#endregion
#region Constructor
/// <summary>
/// Create a new instance of a 'Row' object.
/// </summary>
public Row()
{
// Create a new collection of 'Column' objects.
Columns = new List<Column>();
}
#endregion
#region Methods
#region FindColumn(string name)
/// <summary>
/// returns the Column
/// </summary>
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
/// <summary>
/// This property gets or sets the value for 'Columns'.
/// </summary>
public List<Column> Columns
{
get { return columns; }
set { columns = value; }
}
#endregion
#region HasColumns
/// <summary>
/// This property returns true if this object has a 'Columns'.
/// </summary>
public bool HasColumns
{
get
{
// initial value
bool hasColumns = (this.Columns != null);
// return value
return hasColumns;
}
}
#endregion
#region Id
/// <summary>
/// This property gets or sets the value for 'Id'.
/// </summary>
public Guid Id
{
get { return id; }
set { id = value; }
}
#endregion
#region IsHeaderRow
/// <summary>
/// This property gets or sets the value for 'IsHeaderRow'.
/// </summary>
public bool IsHeaderRow
{
get { return isHeaderRow; }
set { isHeaderRow = value; }
}
#endregion
#region Number
/// <summary>
/// This property gets or sets the value for 'Number'.
/// </summary>
public int Number
{
get { return number; }
set { number = value; }
}
#endregion
#endregion
}
#endregion
}