//private static void InvalidateBallotAll() //{ // CacheBallotPages.TruncateTable(); //} //private static void InvalidateBallotByDomainDesignCodeElectionKey( // string domainDesignCode, string electionKey) //{ // CacheBallotPages.DeleteByDomainDesignCodeElectionKey( // domainDesignCode, electionKey); //} //private static void InvalidateBallotByElectionKey(string electionKey) //{ // CacheBallotPages.DeleteByElectionKey(electionKey); //} //private static void InvalidateElectedAll() //{ // CacheElectedPages.TruncateTable(); //} //private static void InvalidateElectedByStateCode(string stateCode) //{ // CacheElectedPages.DeleteByStateCode(stateCode); //} //private static void InvalidateElectionAll() //{ // CacheElectionPages.TruncateTable(); //} //private static void InvalidateElectionByElectionKey(string electionKey) //{ // CacheElectionPages.DeleteByElectionKey(electionKey); //} //private static void InvalidateIntroAll() //{ // CacheIntroPages.TruncateTable(); //} //private static void InvalidateIntroByPoliticianKey(string politicianKey) //{ // CacheIntroPages.DeleteByPoliticianKey(politicianKey); //} //private static void InvalidateIssueAll() //{ // CacheIssuePages.TruncateTable(); //} //private static void InvalidateIssueByIssueKey(string issueKey) //{ // CacheIssuePages.DeleteByIssueKey(issueKey); //} //private static void InvalidateIssueByOfficeKey(string officeKey) //{ // CacheIssuePages.DeleteByOfficeKey(officeKey); //} //private static void InvalidateIssueByElectionKeyOfficeKey( // string electionKey, string officeKey) //{ // CacheIssuePages.DeleteByElectionKeyOfficeKey(electionKey, officeKey); //} //private static void InvalidateIssueByOfficeKeyIssueKey( // string officeKey, string issueKey) //{ // CacheIssuePages.DeleteByOfficeKeyIssueKey(officeKey, issueKey); //} //private static void InvalidateIssueByElectionKeyOfficeKeyIssueKey( // string electionKey, string officeKey, string issueKey) //{ // CacheIssuePages.DeleteByElectionKeyOfficeKeyIssueKey( // electionKey, officeKey, issueKey); //} //private static void InvalidateOfficialsAll() //{ // CacheOfficialsPages.TruncateTable(); //} //private static void InvalidateOfficialsByStateCode(string stateCode) //{ // CacheOfficialsPages.DeleteByStateCode(stateCode); //} //private static void InvalidateOfficialsByStateCodeCountyCode( // string stateCode, string countyCode) //{ // CacheOfficialsPages.DeleteByStateCodeCountyCode(stateCode, countyCode); //} //private static void InvalidateOfficialsByStateCodeCountyCodeLocalCode( // string stateCode, string countyCode, string localCode) //{ // CacheOfficialsPages.DeleteByStateCodeCountyCodeLocalCode( // stateCode, countyCode, localCode); //} private static void InvalidateNagsAll() { // copy the DonationNagsControl singleton from common to local DonationNagsControl.UpdateIsNaggingEnabled( DB.VoteCache.DonationNagsControl.GetIsNaggingEnabled(true)); // copy the DonationNags table from common to local var table = DonationNags.GetAllData(); DB.VoteCacheLocal.DonationNags.TruncateTable(); foreach (var row in table) { DB.VoteCacheLocal.DonationNags.Insert( messageNumber: row.MessageNumber, messageHeading: row.MessageHeading, messageText: row.MessageText, nextMessageNumber: row.NextMessageNumber); } }
private static void InvalidateNagsAll(bool debugging = false) { // copy the DonationNagsControl singleton from common to local if (debugging) { Debug($"DonationNagsControlGlobal.GetIsNaggingEnabled(true) = {DonationNagsControlGlobal.GetIsNaggingEnabled(true)}"); Debug($"DonationNagsControlLocal.GetIsNaggingEnabled(true) = {DonationNagsControlLocal.GetIsNaggingEnabled(true)}"); } DonationNagsControlLocal.UpdateIsNaggingEnabled( DonationNagsControlGlobal.GetIsNaggingEnabled(true)); Debug($"DonationNagsControlLocal.GetIsNaggingEnabled(true) = {DonationNagsControlLocal.GetIsNaggingEnabled(true)}"); // copy the DonationNags table from common to local var table = DonationNagsGlobal.GetAllData(); DonationNagsLocal.TruncateTable(); foreach (var row in table) { DonationNagsLocal.Insert(row.MessageNumber, row.MessageHeading, row.MessageText, row.NextMessageNumber); } }