Ejemplo n.º 1
0
        private void ReloadFlowers(List<Flower> flowers)
        {
            Flowers.Clear();
            foreach (var flower in flowers)
            {
                Flowers.Add(new FlowerItemViewModel
                {
                    Description = flower.Description,
                    FlowerId = flower.FlowerId,
                    Price = flower.Price,
                });

            }
        }
Ejemplo n.º 2
0
 private void ReloadFlowers(List <Flower> flowers)
 {
     Flowers.Clear();
     //foreach (var flower in flowers)
     foreach (var flower in flowers.OrderBy(f => f.Description))
     {
         Flowers.Add(new FlowerItemViewModel
         {
             Description  = flower.Description,
             FlowerId     = flower.FlowerId,
             Price        = flower.Price,
             Image        = flower.Image,
             IsActive     = flower.IsActive,
             LastPurchase = flower.LastPurchase,
             Observation  = flower.Observation,
         });
     }
 }