Пример #1
0
    //------------------------------------------------------------------------------------------------------------------------------//
    List <VenueData> CreateVenues(LitJson.JsonData json)
    {
        List <VenueData> venues = new List <VenueData> ();
        var venuesJ             = json["response"]["groups"][0]["items"];

        for (int i = 0; i < venuesJ.Count; i++)
        {
            var venueJ = venuesJ[i]["venue"];

            VenueData data = new VenueData();
            data.id    = (string)venueJ["id"];
            data.title = (string)venueJ["name"];

            try{
                data.photo_prefix = (string)venueJ["featuredPhotos"]["items"][0]["prefix"];
                data.photo_suffix = (string)venueJ["featuredPhotos"]["items"][0]["suffix"];
            }catch (System.Exception e) {
                Debug.Log(e);
            }

            venues.Add(data);
        }

        return(venues);
    }
Пример #2
0
    public void LoadData(CityData _city, CategoryData _category, VenueData _venue)
    {
        city     = _city;
        category = _category;
        venue    = _venue;

        // APIもしくはローカルキャッシュからサムネイルを取得
        LoadVenuePhoto();
    }
    public bool VenueRegister(VenueData v)
    {
        bool result = true;
        int  pass   = db.usp_RegisterVenue(v.VenueName, v.VenueAddress, v.VenueCity, v.VenueState, v.VenueZipCode, v.VenuePhone, v.VenueEmail, v.VenueWebPage, v.VenueAgeRestriction, v.VenueLoginUserName, v.VenueLoginPasswordPlain);

        if (pass == -1)
        {
            result = false;
        }

        return(result);
    }
Пример #4
0
 public Venue(int VenueID)
 {
     if (venueCache.Get("venue" + VenueID) == null)
     {
         _data = myDAO.GetVenueData(VenueID);
         venueCache.Insert("venue" + VenueID, _data, new TimeSpan(24, 0, 0));
     }
     else
     {
         _data = (VenueData)venueCache.Get("venue" + VenueID);
     }
 }
Пример #5
0
    //------------------------------------------------------------------------------------------------------------------------------//
    public void LoadData(CityData city, CategoryData category, VenueData venue)
    {
        TextMesh[] texts = transform.GetComponentsInChildren <TextMesh> ();
        foreach (TextMesh text in texts)
        {
            text.text = "";
        }

        // 基本データを読み込む
        transform.FindChild("Info/Venue").GetComponent <TextMesh>().text         = venue.title;
        transform.FindChild("Info/City-Category").GetComponent <TextMesh>().text = city.title + " : [ " + category.title + " ]";

        // サムネイルを読み込む
        transform.FindChild("Venue").GetComponent <Venue>().ClearData();
        transform.FindChild("Venue").GetComponent <Venue>().LoadData(city, category, venue);

        // API経由で詳細データを読み込む
        FourSquareAPI.Instance.LoadVenueInfo(venue.id, OnLoadData);
    }
Пример #6
0
 public Geoposition(Geocoordinate coordinate, CivicAddress civicAddress = null, VenueData venueData = null)
 {
     CivicAddress = civicAddress;
     Coordinate   = coordinate;
     VenueData    = venueData;
 }
Пример #7
0
 public void PushVenueScreen(CityData city, CategoryData category, VenueData venue)
 {
     //べニュー詳細スクリーンをロードする
     venueScreen.GetComponent <VenueScreen> ().LoadData(city, category, venue);
     base.PushScreen(venueScreen);
 }
Пример #8
0
 private Venue(VenueData data)
 {
     _data = data;
 }
Пример #9
0
        public static void doIt(string sched)
        {
            Schedule schedule = new Schedule(sched);

            // ***********PAUL CHANGE SQL STRING TO PARAMETERIZED COMMAND!!!*******
            // https://docs.microsoft.com/en-us/dotnet/api/system.data.sqlclient.sqlcommand.parameters?redirectedfrom=MSDN&view=netframework-4.7.2#System_Data_SqlClient_SqlCommand_Parameters


            //---------------------------------------------------
            // Insert the SCHEDULE into the DB

            int scheduleID = ScheduleData.InsertSchedule(schedule);
            int i          = 0;

            //---------------------------------------------------

            //---------------------------------------------------
            // Insert the list of GAMEs into the DB
            //  INCLUDES:  Insert the TEAMs (insert the CONFERENCE, DIVISION, VENUE), VENUE, list of PERIODs, BOXSCOREs(insert the TEAMGAMESTATS(insert the PERSON/coach, list of PLAYERGAMESTATS), list of PERSON/officials), list of PLAYERs, list of GAMEEVENTs(insert TEAMs, list of PLAYERs), GAMECONTENT)
            if (Convert.ToInt16(schedule.totalGames) > 0)
            {
                foreach (Game g in schedule.games)
                {
                    i = GameData.InsertGame(g, scheduleID);
                    //---------------------------------------------------
                    // Insert the Home and Away TEAMs into the DB
                    //  INCLUDES:  Insert the VENUE, list of PERIODs, BOXSCOREs(insert the TEAMGAMESTATS(insert the PERSON/coach, list of PLAYERGAMESTATS), list of PERSON/officials), list of PLAYERs, list of GAMEEVENTs(insert TEAMs, list of PLAYERs), GAMECONTENT)

                    // Insert the Coach (PERSON) for each team
                    if (!(g.gameBoxScore.homeTeamStats.coach is null))
                    {
                        i = PersonData.InsertPerson(g.gameBoxScore.homeTeamStats.coach);
                    }

                    if (!(g.gameBoxScore.awayTeamStats.coach is null))
                    {
                        i = PersonData.InsertPerson(g.gameBoxScore.awayTeamStats.coach);
                    }


                    // Insert the game VENUE
                    if (!(g.gameVenue is null))
                    {
                        i = VenueData.InsertVenue(g.gameVenue);
                    }


                    // Insert the game Officials (PERSON)
                    if (!(g.gameBoxScore.officials is null))
                    {
                        foreach (Person p in g.gameBoxScore.officials)
                        {
                            i = PersonData.InsertPerson(p);

                            // Insert officials list to the cross reference table (tblGameOfficials)
                            i = PersonData.InsertGameOfficials(g.gameID, p.personId);
                        }
                    }

                    // Insert the Home Team:
                    i = TeamData.InsertTeam(g.homeTeam);
                    i = TeamData.InsertTeam(g.awayTeam);

                    // Insert the CONFERENCE of each team:
                    i = ConferenceData.InsertConference(g.homeTeam.teamConference);
                    i = ConferenceData.InsertConference(g.awayTeam.teamConference);

                    //Insert the DIVISION of each team:
                    if (!(g.homeTeam.teamDivision is null))
                    {
                        i = DivisionData.InsertDivision(g.homeTeam.teamDivision);
                    }
                    if (!(g.awayTeam.teamDivision is null))
                    {
                        i = DivisionData.InsertDivision(g.awayTeam.teamDivision);
                    }

                    //Insert the PERIODs of the Game
                    if (!(g.periodData is null))
                    {
                        foreach (Period p in g.periodData)
                        {
                            i = PeriodData.InsertPeriod(p);
                        }
                    }

                    // Insert the details and stats for each home PLAYER
                    if (!(g.gameBoxScore.homeTeamStats.teamPlayers is null))
                    {
                        foreach (PlayerGameStats homepgs in g.gameBoxScore.homeTeamStats.teamPlayers)
                        {
                            i = PlayerData.InsertPlayer(homepgs);
                            i = PlayerGameStatsData.InsertPlayerGameStats(homepgs, g.gameID);
                        }
                    }

                    // Insert the details and stats for each away PLAYER
                    if (!(g.gameBoxScore.awayTeamStats.teamPlayers is null))
                    {
                        foreach (PlayerGameStats awaypgs in g.gameBoxScore.awayTeamStats.teamPlayers)
                        {
                            i = PlayerData.InsertPlayer(awaypgs);
                            i = PlayerGameStatsData.InsertPlayerGameStats(awaypgs, g.gameID);
                        }
                    }

                    // Insert the GAMEEVENTS for the game
                    if (!(g.gameEvents is null))
                    {
                        foreach (GameEvent ge in g.gameEvents)
                        {
                            i = GameEventData.InsertGameEvent(ge, g.gameID);
                        }
                    }



                    //---------------------------------------------------
                }
            }
        }