예제 #1
0
        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);
        }
예제 #2
0
 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;
 }
예제 #3
0
 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);
     }
 }