コード例 #1
0
 public DescuentoEspecialViewModel()
 {
     this.PropertyChanged += DescuentoEspecialViewModel_PropertyChanged;
     if (!this.IsInDesignMode)
     {
         _proxy     = CommonServiceLocator.ServiceLocator.Current.GetInstance <Common.ServiceContracts.IDataServiceAsync>();
         this.Items = _proxy.GetDescuentoAdicionals();
     }
     if (this.IsInDesignMode)
     {
         this.Descripcion = "desc";
         this.Items       = new Common.Entities.DescuentoAdicional[]
         {
             new Common.Entities.DescuentoAdicional {
                 Id = 1, Descripcion = "r1", Descuento = .1m
             },
             new Common.Entities.DescuentoAdicional {
                 Id = 2, Descripcion = "r2", Descuento = .2m
             }
         };
         this.SelectedItem = this.Items.First();
     }
 }