Example #1
0
		private void calculaNuvens(DataTable dt, TableCloudType nv)
		{
			if (nv == TableCloudType.CA)
			{
				int tempFor1 = dt.ChildRelations.Count;
				for (int i = 0; i < tempFor1; i++)
				{
					if (dt.ChildRelations[i].ChildTable.ChildRelations.Count > 0)
					{
						calculaNuvens(dt.ChildRelations[i].ChildTable, TableCloudType.CA);
					}
					if (! (nuvemCA.Contains(dt.ChildRelations[i].ChildTable.TableName)))
					{
						nuvemCA.Add(dt.ChildRelations[i].ChildTable.TableName);
					}
				}
			}
			else if (nv == TableCloudType.FRD)
			{
				int tempFor2 = dt.ChildRelations.Count;
				for (int i = 0; i < tempFor2; i++)
				{
					if (dt.ChildRelations[i].ChildTable.ChildRelations.Count > 0)
					{
						calculaNuvens(dt.ChildRelations[i].ChildTable, TableCloudType.FRD);
					}
					if (! (nuvemFRD.Contains(dt.ChildRelations[i].ChildTable.TableName)))
					{
						nuvemFRD.Add(dt.ChildRelations[i].ChildTable.TableName);
					}
				}
			}
			else
			{
//INSTANT C# NOTE: The ending condition of VB 'For' loops is tested only on entry to the loop. Instant C# has created a temporary variable in order to use the initial value of dt.ChildRelations.Count for every iteration:
				int tempFor3 = dt.ChildRelations.Count;
				for (int i = 0; i < tempFor3; i++)
				{
					if (dt.ChildRelations[i].ChildTable.ChildRelations.Count > 0)
					{
						calculaNuvens(dt.ChildRelations[i].ChildTable, TableCloudType.NVL);
					}
					if (! (nuvemNVL.Contains(dt.ChildRelations[i].ChildTable.TableName)))
					{
						nuvemNVL.Add(dt.ChildRelations[i].ChildTable.TableName);
					}
				}
			}
		}
Example #2
0
			public tableDepth(DataTable tab, int dep, TableCloudType nuvem)
			{
				this.tab = tab;
				this.dep = dep;
				this.nuvem = nuvem; //necessario para as datas de produção
			}