Exemplo n.º 1
0
 public AddFlowerViewModel()
 {
     flowerTypeRepository = new FlowerTypeRepository();
     flowerRepository     = new FlowerRepository();
     flowerTypes          = flowerTypeRepository.Gets();
     flowers    = flowerRepository.Gets();
     flowerType = new FlowerType();
     flower     = new Flower();
     AddFlower  = new Command(Insert);
 }
Exemplo n.º 2
0
 void GetFlowersByTypeId()
 {
     if (SelectedFlowerType != null && SelectedFlowerType.Id > 0)
     {
         Flowers = flowerRepository.GetsByTypeId(SelectedFlowerType.Id);
     }
     else
     {
         Flowers = flowerRepository.Gets();
     }
 }
Exemplo n.º 3
0
        public ViewResult Index()
        {
            var flowers = flowerRepository.Gets();

            return(View(flowers));
        }