protected override long ProtectedCreateRecord(bool force) { // find the largest ID string q = "select max(ID) from Client"; short MaxID = DataUtils.ToShort(sqlUtil.ExecuteScalarResultSetSQLQuery(q)); ID = MaxID + 1; CreatedDate = DateTimeUtility.ServerDate(); mCachedQuery = null; return base.ProtectedCreateRecord(force); }
/// <summary> /// Get list of active clients. /// </summary> /// <param name="ForceRefresh">to get whats in client table now.</param> /// <returns></returns> public static List<GenericClient> GetActiveClients(bool ForceRefresh) { if (ForceRefresh) mCachedQuery = null; List<GenericClient> ar = new List<GenericClient>(); foreach (GenericClient c in ClientCache) { if (c.Active == (byte)TClientStatus.Active) ar.Add(c); } return ar; }