/// <summary> /// Persists a new instance of UserLocation. Returns true on success. /// </summary> /// <returns></returns> private bool Create() { this.rowID = Guid.NewGuid();; int rowsAffected = DBUserLocation.Create( this.rowID, this.userGuid, this.siteGuid, this.iPAddress, this.iPAddressLong, this.hostname, this.longitude, this.latitude, this.iSP, this.continent, this.country, this.region, this.city, this.timeZone, this.captureCount, DateTime.UtcNow, DateTime.UtcNow); return(rowsAffected > 0); }
private void GetUserLocation(Guid userGuid, long iPAddressLong) { using (IDataReader reader = DBUserLocation.GetOne(userGuid, iPAddressLong)) { PopulateFromReader(reader); } }
/// <summary> /// Gets an instance of UserLocation. /// </summary> /// <param name="rowID"> rowID </param> private void GetUserLocation(Guid rowID) { using (IDataReader reader = DBUserLocation.GetOne(rowID)) { PopulateFromReader(reader); } }
/// <summary> /// Gets an IList with page of instances of UserLocation. /// </summary> /// <param name="siteGuid"> siteGuid </param> /// <param name="pageNumber">The page number.</param> /// <param name="pageSize">Size of the page.</param> /// <param name="totalPages">total pages</param> public static List <UserLocation> GetPageBySite( Guid siteGuid, int pageNumber, int pageSize, out int totalPages) { totalPages = 1; IDataReader reader = DBUserLocation.GetPageBySite(siteGuid, pageNumber, pageSize, out totalPages); return(LoadListFromReader(reader)); }
/// <summary> /// Updates this instance of UserLocation. Returns true on success. /// </summary> /// <returns>bool</returns> private bool Update() { return(DBUserLocation.Update( this.rowID, this.userGuid, this.siteGuid, this.iPAddress, this.iPAddressLong, this.hostname, this.longitude, this.latitude, this.iSP, this.continent, this.country, this.region, this.city, this.timeZone, this.captureCount + 1, DateTime.UtcNow)); }
/// <summary> /// Gets an IDataReader with rows from the mp_Users table which have the passed in IP Address /// </summary> public static IDataReader GetUsersByIPAddress(Guid siteGuid, string ipv4Address) { return(DBUserLocation.GetUsersByIPAddress(siteGuid, ipv4Address)); }
/// <summary> /// Gets an IList with all instances of UserLocation for the site. /// </summary> /// <param name="siteGuid"> siteGuid </param> public static List <UserLocation> GetBySite(Guid siteGuid) { IDataReader reader = DBUserLocation.GetBySite(siteGuid); return(LoadListFromReader(reader)); }
/// <summary> /// Gets an IList with all instances of UserLocation for the user. /// </summary> /// <param name="userGuid"> userGuid </param> public static List <UserLocation> GetByUser(Guid userGuid) { IDataReader reader = DBUserLocation.GetByUser(userGuid); return(LoadListFromReader(reader)); }
/// <summary> /// Gets a count of UserLocation. /// </summary> public static int GetCountBySite(Guid siteGuid) { return(DBUserLocation.GetCountBySite(siteGuid)); }
/// <summary> /// Gets a count of UserLocation. /// </summary> public static int GetCountByUser(Guid userGuid) { return(DBUserLocation.GetCountByUser(userGuid)); }
public static bool DeleteByUser(Guid userGuid) { return(DBUserLocation.DeleteByUser(userGuid)); }
/// <summary> /// Deletes an instance of UserLocation. Returns true on success. /// </summary> /// <param name="rowID"> rowID </param> /// <returns>bool</returns> public static bool Delete(Guid rowID) { return(DBUserLocation.Delete(rowID)); }