예제 #1
0
파일: Teams.aspx.cs 프로젝트: rsalit/CSBC
 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;
         }
     }
 }
예제 #2
0
파일: ColorTest.cs 프로젝트: rsalit/CSBC
 public void GetSponsorVMTest()
 {
     var rep = new SponsorVM();
     var sponsors = rep.GetSeasonSponsors(9);//get a valid sponsor season
     Assert.IsTrue(sponsors.Any());
 }