public void LoadGame( out List <Brands> brands, out List <Cards> cards, out List <Matches> matches, out List <Promotions> promotions, out List <Teams> teams, out List <TitlesMain> titles, out List <WrestlersMain> wrestlers ) { BrandHelper bHelper = new BrandHelper(); CardHelper cHelper = new CardHelper(); MatchHelper mHelper = new MatchHelper(); PromotionHelper pHelper = new PromotionHelper(); TeamHelper tHelper = new TeamHelper(); TitleHelper tlHelper = new TitleHelper(); WrestlerHelper wHelper = new WrestlerHelper(); brands = bHelper.PopulateBrandsList(); cards = cHelper.PopulateCardsList(); matches = mHelper.PopulateMatchesList(); promotions = pHelper.PopulatePromotionsList(); teams = tHelper.PopulateTeamsList(); titles = tlHelper.PopulateTitlesList(); wrestlers = wHelper.PopulateWrestlersList(); }
public int CurrentID( bool isBrands = false, bool isCards = false, bool isMatches = false, bool isPromotions = false, bool isTeams = false, bool isTitles = false, bool isWrestlers = false ) { int currentID = 0; if (isBrands) { BrandHelper bHelper = new BrandHelper(); List <BrandsEntity> allBrands = bHelper.PopulateBrandsList(); currentID = allBrands.Count() + 1; } if (isCards) { CardHelper cHelper = new CardHelper(); List <CardsEntity> allCards = cHelper.PopulateCardsList(); currentID = allCards.Count() + 1; } if (isMatches) { MatchHelper mHelper = new MatchHelper(); List <MatchesEntity> allMatches = mHelper.PopulateMatchesList(); currentID = allMatches.Count() + 1; } if (isPromotions) { PromotionHelper pHelper = new PromotionHelper(); List <PromotionsEntity> allPromos = pHelper.PopulatePromotionsList(); currentID = allPromos.Count() + 1; } if (isTeams) { TeamHelper tHelper = new TeamHelper(); List <TeamsEntity> allTeams = tHelper.PopulateTeamsList(); currentID = allTeams.Count() + 1; } if (isTitles) { TitleHelper tiHelper = new TitleHelper(); List <TitlesEntity> allTitles = tiHelper.PopulateTitlesList(); currentID = allTitles.Count() + 1; } if (isWrestlers) { WrestlerHelper wHelper = new WrestlerHelper(); List <WrestlersEntity> allWrests = wHelper.PopulateWrestlersList(); currentID = allWrests.Count() + 1; } return(currentID); }
public void SaveGame( List <Brands> brands, List <Cards> cards, List <Matches> matches, List <Promotions> promotions, List <Teams> teams, List <TitlesMain> titles, List <WrestlersMain> wrestlers ) { string dir = string.Concat(Directory.GetCurrentDirectory(), "\\Saves"); if (!Directory.Exists(dir)) { Directory.CreateDirectory(string.Concat(Directory.GetCurrentDirectory(), "\\Saves")); } else { string main = string.Concat(Directory.GetCurrentDirectory(), "\\Saves\\" + "\\" + "Main"); if (!Directory.Exists(main)) { Directory.CreateDirectory(string.Concat(Directory.GetCurrentDirectory(), "\\Saves\\" + "\\" + "Main")); } else { BrandHelper bHelper = new BrandHelper(); CardHelper cHelper = new CardHelper(); MatchHelper mHelper = new MatchHelper(); PromotionHelper pHelper = new PromotionHelper(); TeamHelper tHelper = new TeamHelper(); TitleHelper tlHelper = new TitleHelper(); WrestlerHelper wHelper = new WrestlerHelper(); foreach (Brands b in brands) { bHelper.SaveBrandsList(b); } foreach (Cards c in cards) { cHelper.SaveCardsList(c); } foreach (Matches m in matches) { mHelper.SaveMatchesList(m); } foreach (Promotions p in promotions) { pHelper.SavePromotionsList(p); } foreach (Teams t in teams) { tHelper.SaveTeamsList(t); } foreach (TitlesMain tl in titles) { tlHelper.SaveTitlesList(tl); } foreach (WrestlersMain w in wrestlers) { wHelper.SaveWrestlersList(w); } } } }