Ejemplo n.º 1
0
        public void GetCoachVolunteerTest()
        {
            var context = new Core.Data.CSBCDbContext();
            var testinit = new CSBCDbInitializer();
            var rep = new CoachRepository(context);
            var coaches = rep.GetCoachVolunteers(1, testinit.CurrentSeason.SeasonID);

            Assert.IsTrue(coaches.Count<vw_Coaches>() > 0);
        }
Ejemplo n.º 2
0
        private void LoadVolunteers()
        {
            var rep = new CoachRepository(new CSBCDbContext());

            try
            {
                var coaches = rep.GetCoachVolunteers(Master.CompanyId, Master.SeasonId);
                vw_Coaches coach = new vw_Coaches { PeopleID = 0, Name = "" };

                cmbCoaches.DataSource = coaches;
                cmbCoaches.DataValueField = "PeopleID";
                cmbCoaches.DataTextField = "Name";
                cmbCoaches.DataBind();
                cmbCoaches.Items.Insert(0, new ListItem(String.Empty, String.Empty));
                cmbCoaches.SelectedIndex = 0;
            }
            catch (Exception ex)
            {
                lblError.Text = "LoadVolunteers::" + ex.Message;
            }
        }