public static PopupObjectCollection DataTableToCollection(DataTable popups) { PopupObjectCollection objectsTotal; PopupObjectCollection objects = new PopupObjectCollection(); try { IEnumerator enumerator = null; try { enumerator = popups.Rows.GetEnumerator(); while (enumerator.MoveNext()) { DataRow current = (DataRow)enumerator.Current; objects.Add(PopupRowToObject(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 PopupObjectCollection DataTableToCollection(DataTable popups) { PopupObjectCollection objectsTotal; PopupObjectCollection objects = new PopupObjectCollection(); try { IEnumerator enumerator = null; try { enumerator = popups.Rows.GetEnumerator(); while (enumerator.MoveNext()) { DataRow current = (DataRow)enumerator.Current; objects.Add(PopupRowToObject(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 PopupObjectCollection GetActive() { try { PopupObjectCollection Popups = new PopupObjectCollection(); foreach (PopupObject Popup in this) { if (Popup.State != PROF_IT.Common.Enumerations.ObjectState.Deleted) { Popups.Add(Popup); } } return(Popups); } catch (System.Exception exception1) { Exception innerException = exception1; throw new Exception(MethodBase.GetCurrentMethod().Name, innerException); } }
public PopupObjectCollection GetActive() { try { PopupObjectCollection Popups = new PopupObjectCollection(); foreach (PopupObject Popup in this) { if (Popup.State != PROF_IT.Common.Enumerations.ObjectState.Deleted) Popups.Add(Popup); } return Popups; } catch (System.Exception exception1) { Exception innerException = exception1; throw new Exception(MethodBase.GetCurrentMethod().Name, innerException); } }