public void GetTeams()
        {
            if (!(_view is V_LED_HienDiem))
            {
                return;
            }
            //int year = DateTime.UtcNow.Year;

            teams = (new BLL()).GetTeams();
            V_LED_HienDiem view = _view as V_LED_HienDiem;


            Team maxTeam = teams.FirstOrDefault(t => t.Score == teams.Max(x => x.Score));

            if (maxTeam != null)
            {
                view.TenDoiNhat  = maxTeam.Name;
                view.DiemDoiNhat = maxTeam.Score + "";
            }

            Team minTeam = teams.LastOrDefault(t => t.Score == teams.Min(x => x.Score));

            if (minTeam != null)
            {
                view.TenDoiBa  = minTeam.Name;
                view.DiemDoiBa = minTeam.Score + "";
            }

            Team Nhi = teams.FirstOrDefault(x => x.ID != maxTeam.ID && x.ID != minTeam.ID);

            if (Nhi != null)
            {
                view.TenDoiNhi  = Nhi.Name;
                view.DiemDoiNhi = Nhi.Score + "";
            }
        }
Example #2
0
 public App(V_LED_HienDiem v)
 {
     _view            = v;
     _controller      = new LED_HienDiem_Controller(v);
     _view.Controller = _controller;
 }