public void OnSetBuildQuality()
 {
     try
     {
         var  items          = this.view.SelectedBuilds.ToList();
         var  buildQualities = this.repository.GetBuildQualities(items.Select(bd => bd.TeamProject).ToList().Distinct());
         var  wnd            = new SelectBuildQuality(new BuildQualityListViewModel(buildQualities));
         bool?res            = wnd.ShowDialog();
         if (res.HasValue && res.Value)
         {
             using (new WaitCursor())
             {
                 this.repository.SetBuildQualities(items.Select(bd => bd.Uri), wnd.SelectedBuildQuality.Name);
                 this.OnRefresh(new EventArgs());
             }
         }
     }
     catch (Exception ex)
     {
         this.view.DisplayError(ex);
     }
 }
Exemplo n.º 2
0
 public void OnSetBuildQuality()
 {
     try
     {
         var items = this.view.SelectedBuilds.ToList();
         var buildQualities = this.repository.GetBuildQualities(items.Select(bd => bd.TeamProject).ToList().Distinct());
         var wnd = new SelectBuildQuality(new BuildQualityListViewModel(buildQualities));
         bool? res = wnd.ShowDialog();
         if (res.HasValue && res.Value)
         {
             using (new WaitCursor())
             {
                 this.repository.SetBuildQualities(items.Select(bd => bd.Uri), wnd.SelectedBuildQuality.Name);
                 this.OnRefresh(new EventArgs());
             }
         }
     }
     catch (Exception ex)
     {
         this.view.DisplayError(ex);
     }
 }