/// <summary> /// Gets the number of users currently accessing the application. /// </summary> /// <returns> /// The number of users currently accessing the application. /// </returns> /// <remarks> /// </remarks> public override int GetNumberOfUsersOnline() { var totalNumberOfUsers = 0; var portalsDb = new PortalsDB(); var dr = portalsDb.GetPortals(); try { while (dr.Read()) { totalNumberOfUsers += GetNumberOfUsersOnline(dr["PortalAlias"].ToString()); } } finally { dr.Close(); // by Manu, fixed bug 807858 } return totalNumberOfUsers; }
private void LoadPortalList() { portals = new ArrayList(); PortalsDB portalsDb = new PortalsDB(); SqlDataReader dr = portalsDb.GetPortals(); try { while (dr.Read()) { PortalItem p = new PortalItem(); p.Name = dr["PortalName"].ToString(); p.Path = dr["PortalPath"].ToString(); p.ID = Convert.ToInt32(dr["PortalID"].ToString()); portals.Add(p); } } finally { dr.Close(); //by Manu, fixed bug 807858 } }