protected override bool InitCache() { try { string con = ConfigContext.GetInstance().DataBaseSettingProvider.SimpleManagerConnstring; string sSql = "select * from SnsCenter.dbo.ConfigGameProject order by gameid"; using (SqlDataReader reader = SqlHelper.ExecuteReader(con, CommandType.Text, sSql)) { if (reader == null) throw new Exception(); if (reader.HasRows) { List<BaseGameProject> tmplist = new List<BaseGameProject>(); while (reader.Read()) { BaseGameProject oTmpBaseAsp = new BaseGameProject(); oTmpBaseAsp.InitData(reader); tmplist.Add(oTmpBaseAsp); } this.addCache(tmplist); return true; } else { return false; } } } catch (Exception ex) { this.SaveLog(ex); return false; } }
protected override bool InitCache() { try { string con = ConfigContext.GetInstance().DataBaseSettingProvider.SimpleManagerConnstring; string sSql = "select * from SnsCenter.dbo.ConfigGameProject order by gameid"; using (SqlDataReader reader = SqlHelper.ExecuteReader(con, CommandType.Text, sSql)) { if (reader == null) { throw new Exception(); } if (reader.HasRows) { List <BaseGameProject> tmplist = new List <BaseGameProject>(); while (reader.Read()) { BaseGameProject oTmpBaseAsp = new BaseGameProject(); oTmpBaseAsp.InitData(reader); tmplist.Add(oTmpBaseAsp); } this.addCache(tmplist); return(true); } else { return(false); } } } catch (Exception ex) { this.SaveLog(ex); return(false); } }