public static void ClearCache() { String tempUsername = AppUser.Instance.UserName; String tempPassword = AppUser.Instance.Password; IsolatedStorageFile myIsolatedStorage = IsolatedStorageFile.GetUserStoreForApplication(); foreach (String file in myIsolatedStorage.GetFileNames()) { try { if (file.Equals("wptrakt.sdf")) { if (MovieDao.Instance.DatabaseExists()) { try { MovieDao.Instance.DeleteDatabase(); MovieDao.Instance.Dispose(); MovieDao.DisposeDB(); } catch (IOException) { } } if (ShowDao.Instance.DatabaseExists()) { try { ShowDao.Instance.DeleteDatabase(); ShowDao.Instance.Dispose(); ShowDao.DisposeDB(); } catch (IOException) { } } } myIsolatedStorage.DeleteFile(file); } catch (IsolatedStorageException) { }; } IsolatedStorageSettings.ApplicationSettings["UserName"] = tempUsername; IsolatedStorageSettings.ApplicationSettings["Password"] = tempPassword; IsolatedStorageSettings.ApplicationSettings.Save(); foreach (String dir in myIsolatedStorage.GetDirectoryNames()) { if (!dir.Contains("Shared")) { foreach (String file in myIsolatedStorage.GetFileNames(dir + "/*")) { try { myIsolatedStorage.DeleteFile(dir + "/" + file); } catch (IsolatedStorageException) { }; } } } }
/// <summary> /// 获取星程上一条下一条 /// </summary> /// <param name="currentId"></param> /// <returns></returns> public List <Show> GetShowPreviousNext(int currentId) { return(ShowDao.GetShowPreviousNext(currentId)); }
public List <Show> GetShowTagRelation(int currentId, int maxCount) { return(ShowDao.GetShowTagRelation(currentId, maxCount)); }
public List <Show> GetPagedShowByShowDate(PagingContext pager, DateTime sTime, DateTime eTime, PublishStatus publishStatus) { return(ShowDao.GetPagedShowByShowDate(pager, sTime, eTime, (int)publishStatus)); }
public List <Show> GetPagedShowByTagAndBand(PagingContext pager, PublishStatus publishStatus, int tagId, int bandId) { return(ShowDao.GetPagedShowByTagAndBand(pager, (int)publishStatus, tagId, bandId)); }
public List <Show> GetPagedShow(PagingContext pager, PublishStatus publishStatus) { return(ShowDao.GetPagedShow(pager, (int)publishStatus)); }
public List <Show> GetPagedShowByBandId(PagingContext pager, int bandId, PublishStatus publishStatus) { return(ShowDao.GetPagedShowByBandId(pager, bandId, (int)publishStatus)); }
public Show GetShow(int showId) { return(ShowDao.GetShow(showId)); }
public void DeleteShow(int showId) { ShowDao.DeleteShow(showId); }
public int SetShow(Show m) { return(ShowDao.SetShow(m)); }
public EpisodeController() { this.showDao = ShowDao.Instance; }
public ShowController() { this.showDao = ShowDao.Instance; }