public static RevisionObjectCollection DataTableToCollection(DataTable Revisions) { RevisionObjectCollection objectsTotal; RevisionObjectCollection objects = new RevisionObjectCollection(); try { IEnumerator enumerator = null; try { enumerator = Revisions.Rows.GetEnumerator(); while (enumerator.MoveNext()) { DataRow current = (DataRow)enumerator.Current; objects.Add(RevisionRowToObject(current)); } } finally { if (enumerator is IDisposable) { (enumerator as IDisposable).Dispose(); } } objectsTotal = objects; } catch (System.Exception exception1) { Exception innerException = exception1; throw new Exception(MethodBase.GetCurrentMethod().Name, innerException); } return(objectsTotal); }
public static RevisionObjectCollection DataTableToCollection(DataTable Revisions) { RevisionObjectCollection objectsTotal; RevisionObjectCollection objects = new RevisionObjectCollection(); try { IEnumerator enumerator = null; try { enumerator = Revisions.Rows.GetEnumerator(); while (enumerator.MoveNext()) { DataRow current = (DataRow)enumerator.Current; objects.Add(RevisionRowToObject(current)); } } finally { if (enumerator is IDisposable) { (enumerator as IDisposable).Dispose(); } } objectsTotal = objects; } catch (System.Exception exception1) { Exception innerException = exception1; throw new Exception(MethodBase.GetCurrentMethod().Name, innerException); } return objectsTotal; }
public RevisionObjectCollection GetActive() { try { RevisionObjectCollection revisions = new RevisionObjectCollection(); foreach (RevisionObject revision in this) { if (revision.State != PROF_IT.Common.Enumerations.ObjectState.Deleted) { revisions.Add(revision); } } return(revisions); } catch (System.Exception exception1) { Exception innerException = exception1; throw new Exception(MethodBase.GetCurrentMethod().Name, innerException); } }
public RevisionObjectCollection GetActive() { try { RevisionObjectCollection revisions = new RevisionObjectCollection(); foreach (RevisionObject revision in this) { if (revision.State != PROF_IT.Common.Enumerations.ObjectState.Deleted) revisions.Add(revision); } return revisions; } catch (System.Exception exception1) { Exception innerException = exception1; throw new Exception(MethodBase.GetCurrentMethod().Name, innerException); } }