internal static OrganizationCodeCollection GetCollection(DataTable dataItems) { OrganizationCodeCollection listCollection = new OrganizationCodeCollection(); OrganizationCode current = null; if (dataItems != null) { for (int i = 0; i < dataItems.Rows.Count; i++) { current = new OrganizationCode(dataItems.Rows[i]); listCollection.Add(current); } } else { throw new Exception("You cannot create a OrganizationCode collection from a null data table."); } return(listCollection); }
public static OrganizationCodeCollection GetChildrenOrganizationsSortedByLevel(int OrganizationCodeID) { return(OrganizationCode.GetCollection(ExecuteDataTable("spr_GetOrganizationCodeChildrenSortedByLevel", OrganizationCodeID))); }
/// <summary> /// Determines whether the specified System.Object is equal to the current object. /// </summary> /// <param name="obj">The System.Object to compare with the current object.</param> /// <returns>Returns true if the specified System.Object is equal to the current object; otherwise, false.</returns> public override bool Equals(Object obj) { OrganizationCode OrganizationCodeobj = obj as OrganizationCode; return((OrganizationCodeobj == null) ? false : (this.OrganizationCodeID == OrganizationCodeobj.OrganizationCodeID)); }
public static OrganizationCodeCollection GetOrganizationCodesByUser(int userID) { return(OrganizationCode.GetCollection(ExecuteDataTable("spr_GetOrganizationCodeByUserID", userID))); }
public static OrganizationCodeCollection GetOrganizationCodesByRegionLevel(int regionID, int levelID, bool levelPlus) { return(OrganizationCode.GetCollection(ExecuteDataTable("spr_GetOrganizationCodesByRegionLevel", regionID, levelID, levelPlus))); }
public static OrganizationCodeCollection GetOrganizationCodesByRegion(int regionID) { return(OrganizationCode.GetCollection(ExecuteDataTable("spr_GetOrganizationCodesByRegionID", regionID))); }
public static OrganizationCodeCollection GetAllOrganizationCodes() { return(OrganizationCode.GetCollection(ExecuteDataTable("spr_GetAllOrganizationCodes"))); }