Ejemplo n.º 1
0
 private void LoadSponsors()
 {
     using (var db = new CSBCDbContext())
     {
         try
         {
             var rep = new SponsorVM();
             var sponsors = rep.GetSeasonSponsors(Master.SeasonId);
             cmbSponsors.DataSource = sponsors;
             cmbSponsors.DataValueField = "SponsorId";
             cmbSponsors.DataTextField = "SponsorName";
             cmbSponsors.DataBind();
             cmbSponsors.Items.Insert(0, (new ListItem(String.Empty)));
         }
         catch (Exception ex)
         {
             lblError.Text = "LoadSponsors::" + ex.Message;
         }
     }
 }
Ejemplo n.º 2
0
 public void GetSponsorVMTest()
 {
     var rep = new SponsorVM();
     var sponsors = rep.GetSeasonSponsors(9);//get a valid sponsor season
     Assert.IsTrue(sponsors.Any());
 }