Exemple #1
0
        public void GetMatchInformation()
        {
            matchEL.Matchid = 1;
            matchEL         = matchDL.Select(matchEL);

            tvSetNumber.Text = matchEL.Currentset.ToString();


            tvTeamAName.Text   = matchEL.Teamaname;
            tvTeamAWonSet.Text = matchEL.Teamawonsets.ToString();
            tvTeamBName.Text   = matchEL.Teambname;
            tvTeamBWonSet.Text = matchEL.Teambwonsets.ToString();


            if (matchEL.Currentset == 1)
            {
                tvTeamAScore.Text   = matchEL.Teamaset1.ToString();
                tvTeamBScore.Text   = matchEL.Teambset1.ToString();
                tvTeamATimeout.Text = matchEL.Teamatimeout1.ToString();
                tvTeamBTimeout.Text = matchEL.Teambtimeout1.ToString();
            }

            if (matchEL.Currentset == 2)
            {
                tvTeamAScore.Text   = matchEL.Teamaset2.ToString();
                tvTeamBScore.Text   = matchEL.Teambset2.ToString();
                tvTeamATimeout.Text = matchEL.Teamatimeout2.ToString();
                tvTeamBTimeout.Text = matchEL.Teambtimeout2.ToString();
            }

            if (matchEL.Currentset == 3)
            {
                tvTeamAScore.Text   = matchEL.Teamaset3.ToString();
                tvTeamBScore.Text   = matchEL.Teambset3.ToString();
                tvTeamATimeout.Text = matchEL.Teamatimeout3.ToString();
                tvTeamBTimeout.Text = matchEL.Teambtimeout3.ToString();
            }

            if (matchEL.Currentset == 4)
            {
                tvTeamAScore.Text   = matchEL.Teamaset4.ToString();
                tvTeamBScore.Text   = matchEL.Teambset4.ToString();
                tvTeamATimeout.Text = matchEL.Teamatimeout4.ToString();
                tvTeamBTimeout.Text = matchEL.Teambtimeout4.ToString();
            }

            if (matchEL.Currentset == 5)
            {
                tvTeamAScore.Text   = matchEL.Teamaset5.ToString();
                tvTeamBScore.Text   = matchEL.Teambset5.ToString();
                tvTeamATimeout.Text = matchEL.Teamatimeout5.ToString();
                tvTeamBTimeout.Text = matchEL.Teambtimeout5.ToString();
            }
        }
        private void GetInformation()
        {
            matchEL.Matchid = 1;
            matchEL         = matchDL.Select(matchEL);

            var items = new List <string>()
            {
                "3", "5"
            };
            var items2 = new List <string>()
            {
                "Men", "Women", "Mixed"
            };

            var adapter  = new ArrayAdapter <string>(this, Android.Resource.Layout.SimpleSpinnerItem, items);
            var adapter2 = new ArrayAdapter <string>(this, Android.Resource.Layout.SimpleSpinnerItem, items2);

            sBestof.Adapter   = adapter;
            sDivision.Adapter = adapter2;

            sBestof.SetSelection(adapter.GetPosition(matchEL.Bestof.ToString()));
            sDivision.SetSelection(adapter2.GetPosition(matchEL.Division.ToString()));


            etMatchNumber.Text  = matchEL.Matchnumber;
            etRefereeA.Text     = matchEL.Refereeaname;
            etRefereeB.Text     = matchEL.Refereebname;
            etScorer.Text       = matchEL.Scorername;
            etLineJudge1.Text   = matchEL.Linejudges1name;
            etLineJudge2.Text   = matchEL.Linejudges2name;
            etLineJudge3.Text   = matchEL.Linejudges3name;
            etLineJudge4.Text   = matchEL.Linejudges4name;
            etDate.Text         = matchEL.Matchdate;
            etTime.Text         = matchEL.Matchtime;
            etTeamAName.Text    = matchEL.Teamaname;
            etTeamACoach.Text   = matchEL.Teamacoach;
            etTeamBName.Text    = matchEL.Teambname;
            etTeamBCoach.Text   = matchEL.Teambcoach;
            tvTeamASet1.Text    = matchEL.Teamaset1.ToString();
            tvTeamASet2.Text    = matchEL.Teamaset2.ToString();
            tvTeamASet3.Text    = matchEL.Teamaset3.ToString();
            tvTeamASet4.Text    = matchEL.Teamaset4.ToString();
            tvTeamASet5.Text    = matchEL.Teamaset5.ToString();
            tvTeamATimeou1.Text = matchEL.Teamatimeout1.ToString();
            tvTeamATimeou2.Text = matchEL.Teamatimeout2.ToString();
            tvTeamATimeou3.Text = matchEL.Teamatimeout3.ToString();
            tvTeamATimeou4.Text = matchEL.Teamatimeout4.ToString();
            tvTeamATimeou5.Text = matchEL.Teamatimeout5.ToString();
            tvTeamAResult.Text  = matchEL.Teamaresult;
            tvTeamBSet1.Text    = matchEL.Teambset1.ToString();
            tvTeamBSet2.Text    = matchEL.Teambset2.ToString();
            tvTeamBSet3.Text    = matchEL.Teambset3.ToString();
            tvTeamBSet4.Text    = matchEL.Teambset4.ToString();
            tvTeamBSet5.Text    = matchEL.Teambset5.ToString();
            tvTeamATimeou1.Text = matchEL.Teambtimeout1.ToString();
            tvTeamATimeou2.Text = matchEL.Teambtimeout2.ToString();
            tvTeamATimeou3.Text = matchEL.Teambtimeout3.ToString();
            tvTeamATimeou4.Text = matchEL.Teambtimeout4.ToString();
            tvTeamATimeou5.Text = matchEL.Teambtimeout5.ToString();
            tvTeamBResult.Text  = matchEL.Teambresult;
        }