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